javascript

How to use Google API finance and Google chart API?

How do I use the Google Finance and Chart APIs? I want to embed them in my website. Thanks. ...

Problem with floating window and zindex applied

Hi Friends,I have two frames - such as frame1 and frame2I am having a button in frame2, and a floating window will appear while click on it. The problem is, while clicking the button in frame2, the floating window is appears partially behind the frame1. I need to show the floating window which should float on both the frame1 and frame2....

JavaScript: Is there any performance benefit to stopping event propagation?

Is it considered 'good practice' to stop JavaScript event propagation - does it benefit performance in any way? I'm wondering if there is benefit outside of layout purposes where you stop propagation so you don't trigger multiple events accidentially. ...

JQuery retriving the next greatest element

Hi, in JQuery i m having an array like (1,2,6,8) I have already selected the first element that is 1 which i have saved in a JQuery variable submitterid = 1 On clicking a link I am trying to get the next greatest element in the Array than what I have selected in the submitterid.. How can I achieve this? Edit: How to find the l...

Javascript Performance Improvements

I'm currently fighting with Internet Explorer's (IE7) javascript performance issues, and struggling to find good information on improving performance, whether it be for a specific browser or in general. I think it will be helpful to all of us to have a link/tips/hints collection on improving JavaScript performance. Feel free to post wha...

Call Javascript function when a div turns from visibility : hidden

I want to call a javascript function when a div is turned from "visibilty : hidden" to "visibility : none;" Also note that I don't have control over the script which turns this style property of the div. I just want to hook into this. Any possibilities? Or like onFocus() etc? UPDATE : I do not want to use JQuery or other frameworks. Is...

Detecting java disabled in explorer

Hi, Is there a way to detect if java is disabled in Explorer? navigator.javaEnabled() //This always returns true even if java is not installed ...

IE7 glitches with building tables cells dynamically

I am working on jQuery plugin. It building tables dynamically. // ... ... var currentTBL = document.createElement('table'); $(currentTBL).attr('width', _width).attr('height', _height); var currZoneIndex = 0; for (var y = 0; y < limitRow; y++) { var currentTR = document.createElement('tr'); var currentWidth = 0; for (var x = 0; x < l...

javascript: waiting for an iframe page to load before writing to it (but not from the page that's triggered the load)

Apologies if this has been answered elsewhere, but I haven't been able to find it referenced. (Probably because nobody else would want to do such a daft thing, I admit). So, I have a page with three iframes in it. An event on one triggers a javascript function which loads new pages into the other two iframes; ['topright'] and ['bottomri...

JavaScript: get value of dropdown

I have 3 HTML combo/drop down boxes. All of them have a distinct name and id. On a particular event I want to get the value of all three of them. Can any one give me a code snippet for that? ...

Redirect to previous view and inject a javascript alert

Hi all, I need to do the following: I have a textbox, which appears in every page of the site, that allows to subscribe to a newsletter. This I've done already and the user is redirected to previous view after subscription. I'd like to add a javascript alert to the page the user is returned to, something like "Thanks for subscribing"....

Is there a cross-browser method to bring a popup window into the foreground?

I have a chat in a popup browser window. This chat page (ASP) checks for new messages every 10 seconds. I would like to bring this popup window to front when there is a new message. I tried with "window.focus()", but this work only in few version of IE. Are there other options to achieve my goal? ...

Load content as an element scrolls into view

Hey everyone, I have a list of search results in a <div> element with a static height and overflow: auto; in the style. I would like to load only the first x number of search results (e.g. 20), and load another x results as the user scrolls to the bottom of the element containing the search results. Can anyone explain to me how I would...

Extending TinyMCE to show a list of possible Internal pages which the user may wish to link to

Is it possible to extend the TinyMCE rich text editor to allow the insertion of Internal Links to my web sites pages. I already have a function which can return the list of page names and URLs however I cannot figure out how to add a new button to the Advanced Link plugin. I have worked with the Image Manager and Document manager plugi...

sending ajax request

I am using ajax to reload the part of page.When the user clicks on one button the part of the page enclose with div tag is reloaded.But there is some time between the time from when the request is shown and the time the response is obtained.So I want that for this intermediate time some gif image (like loading) should be displayed in t...

introduction to unit-testing in javascript

I have never done any testing in javascript. I know, I know. But the reason is that I've never built big javascript applications before, so I've never seen any reason for getting into testing. But now I figured it's about time to get crackin'. The only problem is that everywhere I go, every testing framework seems to rely on the fact t...

how to get a HTML textbox Value into another HtMl table .

see.first index.html has a add button..whenever the add button get active it should be add the textbox value into the table.html.The table.html table should be editable and updatable.. pls friends give solution to me......... ...

Two of the same image displayed by thickbox gallery at once

I am having a problem where occasionally two of the same images will load up, one on top of the other so both are showing. This only happens on the first image that loads up and is very intermittent. Has anyone else run into this problem using thickbox? Does anyone know how to fix it? Thanks ...

JavaScript event.keyCode constants

When testing a JavaScript in Firefox 3.5, I have access to constants such as KeyEvent.DOM_VK_D, but not in Google Chrome. Is there a cross-browser way of accessing these constants? ...

javascript form submit issues

There is one form i have and a user can click on preview button or save button , both buttons send data to different locations. Here is the relevant code: prevAction = location.href; document.getElementById('preview').value='true'; document.getElementById('form1').target='_blank'; document.getElementById('form1').action = 'http://www.x...