javascript

Javascript window.open observation when window already exists using Prototype

I've come across an odd scenario in which window.open() is not triggering the 'load' event if the actual window is already on the screen. Synopsis I have a button that when clicked runs some javascript and opens a page in a new window. Standard code that any JS developer has seen. When the method (part of a larger class) is called, it...

When and why to 'return false' in javascript?

When and why to 'return false' in javascript? ...

Can Javascript access the DOM of an Ajax text/html response?

I'm trying to use Ajax to fetch an HTML page and then pull out a div by it's ID, and insert that DIV into the current page. So the current page loads (via Ajax) a second page, pulls the div out of the Ajax response and inserts into the current page. However I am at a loss as unless the response is text/xml, I cannot use any DOM functions...

Javascript - synchronizing after asynchronous calls

Hello, I have a Javascript object that requires 2 calls out to an external server to build its contents and do anything meaningful. The object is built such that instantiating an instance of it will automatically make these 2 calls. The 2 calls share a common callback function that operates on the returned data and then calls another ...

How to update span when text is entered in form text field with jquery

I would like a span to update when a value is entered into a text field using jquery. My form field has a text box with the name "userinput" and i have a span with the id "inputval". Any help would be greatly appreciated. ...

Jquery width() through iteration?

I'm having a bit of trouble iterating and retrieving width() values. $(".MyClass").each( function(){ elemWidth=$(this).width(); } ); so for each "MyClass" element i would like to find the width (some are different). But the above code only produces the width() of the first instance of MyClass and returns 0's after that. Any ...

Cookie in Javascript(login page design)

Previously I had posted a program and asked about handling cookies in Javascript. I had posted one code and u can find it in my other question. Many gave good answers and I aslo tried their solutions. But since I am new to this html and javascript may be I dont know how to find bugs and debug it. So can anybody please post their solutio...

Adding a new row (with a templated column) to an Infragistics UltraWebGrid

I am using the Infragistics UltraWebGrid to capture some data. I don't have this grid bound to a datasource, I simply access the values I need when the user clicks a save button. I need to add autocomplete functionality to one of the columns in this grid, easily achieved with an asp.net textbox and ajaxtoolkit autocomplete extender. Pr...

Has anyone worked with JSLab DOM correction library (JDC lib) ??

Has anyone worked with JSLab DOM correction library (JDC lib). I guess this enables IE to support for many of the events/methods which were till now only supported by Mozilla,safari etc... I'm looking for help with implementing this library.... For example: I have a event DOMNodeInserted which works well in firefox but has no suppor...

Draw Arc using javascript

Is there a way to draw an arc using points in JavaScript?? I need to draw an arc when I specify a group of points. ...

what is the purpose of javascript new Boolean() ?

what is the use of var flag = new Boolean(false); in compare to var flag = false; when would you actually use new Boolean? ...

Shrink image using javascript

Hi everyone, I need to shrink the image that was kept in div background-image using javascript.for that image four's side having rounded corner. Is it possible in javascript? any suggestions ? Thanks & Regards Ravi Kumar ...

How to stylize a combo box?

How to stylize a combo box? ...

Building dynamic form parts using jQuery

(Hope this doesn't get duplicated; second attempt at submitting this question) I'm working on a form in which I'd like to give the user the ability to add an undetermined number of Contacts (Name and Phone Number). I only want to show one row of these form fields to start with, and allow the user to click an element which will add dupl...

xmlHttpRequest Response

Hi Every Body I'm Having Some Confusing Problem And I Need Help I Have Written Some Code To Initialize xmlHttpRequest To Send Request And Recieve Some Response,Here Is My Code: function initRequest(url) { if(window.XMLHttpRequest){ req=new XMLHttpRequest(); } else if(window.ActiveXObject) { isIE=true; ...

Javascript for command line utilities

Given a need to write command line utilities to do common tasks like uploading files to a remote FTP site, downloading data from a remote MySQL database etc. Is it practical to use JavaScript for this sort of thing? I know there are JavaScript interpreters that can be run from the command line, but are there libraries for things like F...

Has anyone got processing.js working in IE?

I'm looking for examples of processing.js working in Internet Explorer via ExplorerCanvas or similar. ...

Javascript get id

function check(id){ var _id = document.getElementById(id); url = "test.php?check=1&id=" + _id; } i want the id in the url it's working but without the id that is in the check('123'); It's for an innerHTML to load something hope you can help me with getting the id Greetings ...

PHP, how to create count down timer?

How to do this: "you will be redirected to domain.com in 5..(4,3,2,1) seconds" in php??? ...

search text in other text and highlight it using javascript

find text in given in textbox on buttonclick in html static page.and then hightlight it using javascript ...