javascript

Show numbered intervals above jQuery slider

Hallo, I've added a jQuery slider and now I want to have numbers above the slider which denotes the intervals. Almost like a everyday ruler. Does anyone have a quick method to accomplish this? ...

ActiveXObject problem

hi all, new ActiveXObject("Scripting.FileSystemObject") this activex works in ie but not in firefox anybodies know the equivalents to firefox,chrome,safari,opera etc? thanks in advance ...

How do I extract the largest image (by dimension) on a site given the URL?

For instance, if I input: http://www.google.com/ It would return: http://www.google.com/images/logos/ps_logo2.png Using javascript/jquery. These sites would all be external. Thank you! ...

HTML input fields does not get focus when clicked

I have a problem and I can't figure out what exactly is causing this behavior. I cannot access my input fields and textareas on my HTML form. Unfortunately, the JS, HTML and CSS are very large, so I can't really post it all here. Can anybody tell me what to look for when debugging this strange behavior? UPDATE If I move the cursor ...

jQuery UI Slider stop

I'm using the jQuery slider as a submit button because it's cool and a good anti-spam filter. However, when the form is validated, in case the user didn't fill something out, the page displays and alert and set the slider value to 0. It works pretty well, excepting by the fact that when the user dismiss the alert, the slider goes back to...

jQuery slideshow plugin that can make this on the image

Please advise me a jQuery carousel plugin that can make a carousel like the one on the image. I mean that, when the image item becomes active, it moves into the center and becomes large. Thanks. ...

How do i pass a javascript variable in querystring from one html page to other

I have two html pages example1.html and example2.html ,how can i pass a javascript variable username from example1.html to example2.html in querystring. <script type="text/javascript" > $(document).ready(function() { $('#SubmitForm').submit(function() { var username = ($("#username").val()); .........

Javascript's setExpression is the biggest problem for me. Any solution to overcome this.

I am trying to freeze my gridview header for last 2 days and got this link and many other links too provided to me on Stackoverflow as well as from googling. This worked fine when i used it on IE 6,7 and under compatibility mode in IE8 but in normal mode, this code is not working. This line is giving me an error. I want to implement thi...

How to change the input to uppercase as it is being typed

I am using onkeyup="this.value=this.value.toUpperCase();"to change input text value in uppercase. This is working but my need is to change a single letter in input box without using mouse event. If i use left arrow key to move cursor backward onkeyup event gets triggered and the cursor moves to end. How do I modify this script, so that I...

Get id's and add to array, delete from array jquery

Hello, i have the current .each in my javascript var divs = array(); $('.div-item').each(function(){ var id = $(this).attr('id'); divs.push(id); }); How would I delete an id from the array programmatically? ...

javascript regex rule problem

function checkVideoUrl(url){ var regex= [],urlmatch= false; regex[0] = /http:\/\/www.56.com\/\S+\/([^\/]+).html/i; for(i=0;i<regex.length;i++){ urlmatch =regex[i].test(url); if(urlmatch == true) break; } return urlmatch; } alert(checkVideoUrl('http://www.56.com/w68/album-aid-8529817.html'));//true alert...

Javascript toFixed() function

I'm trying to format the user input values using following technique, but I get the following error on Fire Bug console $(this).val().toFixed is not a function $(".amount-text").bind('change',function () { $(this).val(($(this).val()).toFixed(2)); }); Can some one help me on this? ...

Confirm dialog from silverlight crashes firefox

Hi all! I've found some strange behaviour of firefox 3.6 - when I call HtmlPage.Window.Confirm() method from my silverlight 3 app it crashes the browser. This behaviour, I think, begins from the version when plugin container became separate process. Maybe it is cross-thread issue of firefox. Did anybody face this problem? Thanks a lot...

multiple domain session handling in servlets

I need to share sessions between multiple domains. By multiple domain I mean, I have one instance of tomcat6 running. And I can access my webapp using urls localhost:8080/webapp/test.jsp and myhostname:8080/webapp/test.jsp (as I configured dns entry in hosts file) Now, The javascript fires ajax calls to localhost:8080/webapp/ActionA ...

Force action to queue from $.each loop

I am animating html elements (cards) using jquery. I need to animate a dealing action ('one you for you, one for me, one you you, one for me...') so want the cards to fully animate (move position) before the next one starts. I am creating the cards in a $.each function and calling the animation from there (to avoid looping again unnecess...

Shortened syntax wastes memory?

I found that a neat way to convert an array-like object (e.g. NodeList, Arguments) into a real array is to use: Array.prototype.slice.call(...); Then, I thought of a way to shorten this syntax: [].slice.call(...); Would the latter method waste time and/or memory by creating a new array each time that it is called? Should I avoid th...

HTML5 + Jscript with JQuery, setInterval problem

Please can someone tell me why this isn't working before I defenestrate everything on my desk. I have the following html document: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html";...

Password Protect HTML5 Offline Application Directory

I have an HTML5 app which is capable of running offline. However, I need to password protect the directory this app resides in to only allow access to authorized users. Initially I was using a PHP login page which set a cookie (outside of the app directory) then redirected to the app directory. The app (JavaScript) checks for the cook...

How to implement search textbox as in stack overflow website?

I have a search textbox in the web page. When the user presses enter key after entering text in that textbox then the search function should get executed. How to do this? ...

variable hoisting

alert(myVar1); return false; var myVar1; above code throws error in IE, FF and Opera stating that return statement has to come in the function. But it works (shows undefined) in Safari and Chrome. [The above code has been written in global scope. Outside all the functions] Any reason? ...