javascript

Is there any way to copy contents (text) of a pop up window from a web page,automatically in an Excel cell?

There is a web page with products(description and prices).If someone wants more details has to click on a row in order to open a pop up window with more details about the certain product.Is there any way to automatically copy the contents of the pop up window into a cell next to the cells i get the data from my web query? the pop up wind...

Javascript render jpeg binary data from variable

How to render JPEG/PNG file data contained in Javascript variable? Is it possible ? What javascript libraries needed ? Browser in use is FF / IE. Thanks ...

How to display a wait gif until image is fully loaded

Most popular browsers, while rendering an image, they display it line-by-line top-to-bottom as it loads. I have a requirement that a wait gif should be displayed while the image is loading. When the image is fully loaded then it should be displayed instead of the wait gif. ...

Using JavaScript eval to parse JSON

Question: I'm using eval to parse a JSON return value from one of my WebMethods. I prefer not to add jquery-json because the transfer volume is already quite large. So I parse the JSON return value with eval. Now rumors go that this is insecure. Why ? Nobody can modify the JSOn return value unless they hack my server, in which case I...

Javascript: td value == td value

Hello <tr> <td class = "nowrap cr" id="cr1">123123</td> <td class = "nowrap ch" id="ch1">123123</td> </tr> <tr> <td class = "nowrap cr" id="cr2">123123</td> <td class = "nowrap ch" id="ch2">123123</td> </tr> <tr> <td class = "nowrap cr" id="cr3">467574</td> <td class = "nowrap ch" id="ch3">123123</td> </tr> How do I set the font-weigh...

How to create object of Date("23.03.2010")

I have astring directly coming form the database and I am creating object of Date as Date dt=Date("23.03.2010") and it is comin NaN whereas when I use Date dt= Date("03/23/2010") it works fine. Any Idea how I can get this working?. ...

How to use variables in li:n-th child in jQuery.

Hi All, As the title goes I am trying something like $("ul li:nth-child(' + xx + ') a").text() //this is coming as blank. what is the correct format? ...

multiplayer / visitors interactions with Ruby on Rails?

I want to have interactions between visitors on my site. Imagine a chat room. It basically involves getting the data from everyone and sending it to everyone, this can be done by ajax and what not but I wonder if there is something already there in the wild that would do the heavy lifting for me. I have to say that I got very lost once...

Passing var from php to javascript

I try to do something pretty strait... getting php value to javascript here is the page here is the code.. <script language="javascript"> <?php $imagepath = $_REQUEST["path"]; ?> var whatisthepath = <?php $imagepath; ?> alert (whatisthepath); </script> ALWAYS getting UNDEFINE.... why ? -- Final wordking optimized code : ...

javascript inline script doesn't work after jquery import from cdn

Hi stackers, I've got the following code: <code><html> <body><br> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js" /> <script type="text/javascript"> alert("debug"); </script> </body> </html> And i don't know why the second script isn't loaded. I've also tried: <html> <body><br> <script type="text/...

adding image to dom and requesting content of txt file using Ajax. does it take same time ?

I have image and txt file of same size say 200 KB. Now i would like to calculate the time to download the image and text of text file. Now my question is adding image to DOM and and then calculating time on onload and requesting content of txt file using Ajax will they take same time or due to image and xml they will take different tim...

How can I test if an input field contains foreign characters?

I have an input field in a form. Upon pushing submit, I want to validate to make sure the user entered non-latin characters only, so any foreign language characters, like Chinese among many others. Or at the very least test to make sure it does not contain any latin characters. Could I use a regular expression for this? What would be th...

how to make a JSON call to a url?

Hi I'm looking at the following API http://wiki.github.com/soundcloud/api/oembed-api the example they give Call: http://soundcloud.com/oembed?url=http%3A//soundcloud.com/forss/flickermood&amp;format=json Response: { "html":"<object height=\"81\" ... ", "user":"Forss", "permalink":"http:\/\/soundcloud.com\/forss\/flickermood", "titl...

What is <script type="text/javascript"><!--mce:0--></script>?

In this blog, http://www.bswebdev.com/2008/12/javascript-change-input-box-type-to-password/ I have found the following snippets for fixing change input type through javascript in IE6. <script type="text/javascript"><!--mce:0--></script> # put the script in the head of your html <input id="pw" name="password" type="text" value="Passw...

Project world coordinates(POIs) on radar

I have some POIs(lats,lons) and i want them to be properly displayed as dots on a radar image.I have read about radar projection but i have not found some sample code.Any ideas? ...

Get clientid in user control from external javascript file

Hello, I am developing a user control (ascx) in ASP.NET which uses javascript for manipulating controls. Currently the javascript code is inlined and uses <%= somecontrol.ClientID %> to get the control it needs. I want to put the javascript file in external file but from external file I cannot use the above syntax for retrieving contro...

Javascript object literals

When should object literals be used in javascript, sometimes I get confused I am trying to apply oop concepts and pattern to the language. I am trying to not just use procedural programming concepts because I know the language has amazing capabilities. ...

how to change link url on the web browser's status bar.

I already read many article about this issue in here, SO. I just want to discuss how to do it. NOT the moral issue. -- for example. at the google search webpage. before I click the link, the link does not indicate the google url. but After I click the link with shift-key, the url on the status bar is changed. this mean the goo...

horizontally scrollable table column

Hello, I would need to build a html table that has a horizontally scrolable column. The scroll should be placed in the column's header. My question first question is: do you know any jquery plug-in that is able to do this? My second question: is this possible using a single table. I've heard that in order to do this you need to use mul...

jQuery UI Dialog Error: b("<div></div>").addClass("ui-widget-overlay") is undefined

I have the below code for my a Dialog box for a which contains a dropdown field KPMS.ServiceRequests.Status = { showOptions : function(requestId, userId, requestType) { var url = BASE_URL+'service_requests/status_options/'; $("#dialog-modal").dialog("destroy"); $("#dialog-modal").load(url, {"request_id": requestId, "user_...