input validation
How can I check that an input textbox has a float value with no more than 3 places after the point in javascript? ...
How can I check that an input textbox has a float value with no more than 3 places after the point in javascript? ...
I'm trying to add disqus comments per-marker on a google map. To make it per-marker, I've added an iframe to the infowindow, with a different URL for each marker. It works, and I can post comments, but the infowindow isn't updated after a successful post; the spinner remains. Firebug says: Access to 'file:///foo/gmap/comments.html?dsq=1...
Proxy Auto Config (PAC) is the traditional method by which web-browsers are automatically configured to use the appropriate proxy for any given site. PAC files consist of a single function implemented in JavaScript. I'd like to execute this function for another puropose: I'm trying to make an application which selects a proxy to use in...
I use an ajax ModalPopupExtender on many pages to display confirmation dialog. So i would like to reuse same code on all pages by placing it in a use control. But I'm not sure it it possible to access this user control from a javascript (I don't want server side operations). This is the code that is responsible for popup display, that ...
I want to run the following jquery code on every page in my website. $(document).ready(function(){ $("#more").click(function(){ $("#morediv").slideToggle("slow"); return false; }); }); In all my pages I have the more and morediv elements defined, for every page I have different js file and adding this code in ev...
I am having a JSP page, where i am dynamically creating a Table data. ( My page is having only table, and nothing else ). Number of rows in table can go upto 1000s. What i am doing is: after the complete page i have written <script> function printPage(){ window.print(); } </script> This code is working fine to print all pages ...
Here's the problem: I have couple of pages which gets its content from a database. The content is displayed in a Literal control kept on an asp.net page. The article sometimes gets quite long so I want to break the content into two parts using a client script. Unfortunately I cannot change the query to pull data partially. The entire d...
Does jQuery - or one of it's plugins - have equivalent functionality to the YUI StyleSheet Utility? "The StyleSheet Utility is capable of creating new stylesheets from scratch as well as modifying the existing stylesheets held as properties of elements sourced from the same domain or any inline elements." This (I'm fairly sure) is cr...
Hi, how do I prevent the user to change the value in an input field (which contains a certain value to be copied into the clipboard) without using disabled="true"? The text should be selected once the user clicks in the field (that's working already) but entering anything should have no effect. Thanks jQuery('input.autoselect[value]')...
I am looking for the best performing script for providing a hover state to rows within a grid. 90% of users have ie6 clients therefore I cant rely on css :hover The grid is a standard table, some cells have inner tables. I originally started using the .live method with mouseover and mouseout, however this has massive cpu implicatio...
I'm banging my head against the wall with an issue I'm having in IE8. I am using the fadeIn function on jQuery to make the site content fade in. This works perfectly fine in all of the other browsers, but when the fadeIn finishes in IE8 the font anti-aliasing seems to change, causing the text to shift slightly. You can see the site at h...
Using the JavaScript Native Interface of GWT I can perform the following: public native static String getNativeVariableFoo() /*-{ return $wnd.foo; }-*/; Which will return the contents of a JavaScript variable called foo. How can I expand upon this to accept the variable name as a parameter? ie: public native static String getNat...
Does it have to open in the sam Eg: function write(){ document.write("write") } input type="button" onclick="write()" value="Click" ...
Hi, i'm creating an FAQ page where the answer is toggled by clicking on the question. The question is h3 and the answer is several "p" elements. Like this: <h3>The First Question</h3> <p>Answer Paragraph</p> <p>Answer Paragraph</p> <p>Answer Paragraph</p> <h3>The Second Question</h3> <p>Answer Paragraph</p> <p>Answer Paragraph</p> Ho...
Code is as follows but I get a "ytplayer is not defined" error. Is this an issue with <script src="http://www.google.com/jsapi"></script> <script> google.load("swfobject", "2.1"); </script> <script type="text/javascript"> function updateHTML(elmId, value) { document.getElementById(elmId).innerHTML = value...
I would like to be able to massage certain categories of news feeds to make their entries more consistent. For example, when a job seeker subscribes to two different job sites the feeds s/he gets will differ markedly. One would like to be able to perform lookups and other work in the news reader, process the incoming feed on the basis of...
How would I go about setting a link to perform certain functions like hide div then go to destined url something like this $(document).ready(function(){ $("a").click(function(){ $("#div1").slideUp("slow"); $("#div2").slideUp("slow"); // then go to index.html }); }); This is my setup. <script type="text/javasc...
This is a script that, when a link is clicked, will pull a page from somewhere and insert it in a div in the current page. Pretty simple, yes, but being the thick head I seem to be, I can't figure out how to implement it; i.e. how to formulate the link so that it will point the script to the page we want to load in the div we want? The...
While user uploading a file, is it possible to know if the uploaded file is an image or not, I am open for any solution, Client Side, Server Side or both and we choose based on the case. ...
I am a pretty good programmer(IMO only, of course. Know Python, Java well. Tried my hands at Lisp, Ruby, Haskell). I also know how to use Jquery reasonable well, so I know Dom manipulation. I want a recommendation on a Javascript book, which teaches the Language. My criteria are, 1. Fast paced and for programmers who know programming. D...