javascript

Special Characters in JavaScript not displaying properly on website

Hi, My IE and Chrome browsers are not displaying the French phrases correctly when I go from a French phrase (onload function) to a English phrase (onmousedown function) and back to a French phrase (onmouseup function). When I let up on the mouse of a particular phrase it goes back to French but the special characters for ô and é (which...

Google AdSense Conversion Tracking with AJAX form

Hey everyone! I have a google adwords conversion tracking code that I need to implement basically on an onclick event. The form I am tracking submits information using AJAX and then renders a Thank you message to the page by replacing the form's div with the thank you HTML ( $('div').html("thank you....., etc"); ) I'm wondering if t...

How do I make an input radio button checked...using JQuery?

<input type="radio" name="sort" value="2" id="myradio"> How do I make this checked in JQUERY? ...

js/iframes: force iframes to reload

How can I force an iframe to reload and not load from cache? ...

\n and \t and getting them to display in a <textarea> using javascript or .net

HI, using C# I am saving formated HTML data in MSSQL such as: <div>\n\t<p>x</p>\n</div> I am than populating it into a textarea to display. I understand that I can use the .val() method in jQuery to pull all of the ASCII characters out of the textarea, however, I can't seem to figure out how to get the "\n" and "\t" characters to show...

jslint ignore Expected '{' errors

I have a lot of Expected '{' and instead saw 'blah' errors that spit out when I run my scripts through jslint. Is there an option that ignores this error? ...

Javascript News Scroller

see the news scroller on the top of this site http://track.dc.gov/Agency/DH0 Any idea what library/functions this site uses to implment such a smooth scroller? ...

Dynatree slow when dynamically loaded with 100+ nodes

How do I speed it up? I get the results from JSON web service (lightning fast). Adding nodes to the tree using something like parentNode.addChild({ key: key, title: value, addClass: cssClass }); Unfortunately, a tree with 100+ elements takes 1.5 minutes to load. I am disappointed...is it not made to be us...

Google AJAX API Loader

I am having a problem loading the Google AJAX APIs in response to user input instead of when the page loads. This works: <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load("search", "1"); google.setOnLoadCallback(function() { alert("loaded"); }); </s...

Safari not rendering image during a on-click event

I am so frustrated. Just when I thought I had this figured out I have the client look at it (they use Safari) and the image doesn't come out! They also don't want the text for each image but rather a small number to click on as seen in this image: http://www.winteradagency.com/mrw/images/marquita1234.jpg The site with the issue is at...

Does SIFR work well cross-browser?

I have seen a few sites now that use SIFR, and I can see the benefits. I have (quickly) looked into other plugins similar, but SIFR seems to be quite good. So it good in terms of cross-browser compatibility? ...

Problem with jQuery in IE8 with Fancybox

I recently aquired an old website (we're talking tables, image maps, you name it). I was asked to make an old link to a Flash gallery into a lightbox. I simply used a javascript: openLightbox() on the gallery link (top right corner). I know, I know, but it doesn't seem out of place on this site. Anyway, I also include a JavaScript file...

Does JavaScript support multiple threads? If not, how should I implement sleep()?

Possible Duplicates: Sleep in Javascript Is there some way to introduce a delay in javascript? how to make a sleep in javascript? It seems no sleep() function provided, can we make one? ...

Images are overflowing their container in IE8 with Fancybox

In a sort of follow up to this question, I have another problem in IE8. When clicking the gallery and the lightbox appears, the images are overflowing their containing element (by the looks of things). Has anyone ever experienced this before? Of course, the good guys (Firefox/Safari/etc) display it perfectly. How do I fix this? Tha...

How to create object property from variable value in javascript?

Hi, I want to add new property to 'myObj', name it 'string1' and give it a value of 'string2', but when I do it it returns 'undefined: var myObj = new Object; var a = 'string1'; var b = 'string2'; myObj.a = b; alert(myObj.string1); //returns 'undefined' alert(myObj.a); //returns 'string2' In other words: How to create an object prope...

Global Javascript Event Handling Object Context

I have the following problem in event handlers in Javascript. I've got an object that has a mousemove event handler like so. function MyObject(){ } functino MyObject.prototype = { currentMousePosition: null, onMouseMove: function(ev){ this.currentMousePosition = this.getCoordinates(ev); }, getCoordinates: functio...

Dynamically replacing simple DOM element with a template, processed with web-service's result values

M(model): HTML, V(view): CSS, C(Controller): JavaScript Hi, I'm maintaining a personal bookshelf (a list of books) in a simple static HTML document, ie: <ul> <li class="book">Kitting tips and tricks</li> <li class="book">La Bonne Cuisine Of Madame E. Saint-Ange: The Essential Companion For Authentic French Cooking</li> <li class...

IE intermittently doesn't execute a dynamically added script file

We have some JavaScript that writes a script include to a dynamic resource in our web page in order to allow us to communicate some information between pages served from different servers that are subject to cross site scripting restrictions. The idea is that the browser requests the JavaScript file which is served by a dynamic resource...

How to detect the screen resolution with JavaScript?

Is there a way that works for all browsers? ...

How to modify web page elements loaded in a browser

I want to associate some actions with keys (of a keyboard) and then modify the contents of a webpage loaded in the browser. For example, I'll write a firefox plugin and that would be listening to some keyboard events. Based on a key press (or something like that) I want to modify the html code of the page. For example, I would like to ch...