javascript

string to datetime conversion javascript

How do I convert string(09-Apr-2010) in to date time using java script?I need to compare the dates for validation ...

Sony Bravia JavaScript API & Emulator

I recently purchased a Sony Bravia TV that comes with Internet capability built in. It supports a number of internet capable widgets and web video streaming apps for sites like youtube, twitter & various yahoo! offerings. I'd like to hack on the SDK, but the only version I can find is Japanese. Is there an English version of the SDK?...

How to override browser default download behavior for files?

Lots of times we have to download files from the net. In IE we get to see the ugly download progress bar. In firefox we get to see a pop-up window opening etc. However, I have never seen this being over ridden in any manner. Until recently on the site > *thesixtyone DOT com* If we get to download a song free and click on the ok link...

How to call Ajax function recursively.

Hi guys, I want to know how to call Ajax function Recursively. My ajax code is like this, <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> var step='1'; $.ajax ( { url: 'test1.php', data: {step: step}, success: function(output) { ...

jEditable - how do I get the edited textfield variable?

I have a table that I use jEditable with. Saving to the server works, but the callback for refreshing my table element (that I just edited and saved to the server) does not work. /* Apply the jEditable handlers to the table */ $('#example tbody td').editable( '<%= url_for :controller => 'impact_matrix', :action => 'post', :scenario...

JQuery Hotkeys: Is there a way to bind hotkeys that work even inside an input element?

I've been using JQuery hotkeys to make an internal tool for a team of developers. It'd be nice for them to be able to navigate through the entire page using only the keyboard, but I've been having problems when they end up in input fields. Is there a way to bind a hotkey and make it work even inside an input element? I got my jQuery-h...

How to stop toggle event from being fired multiple times on mouseenter/mouseleave?

Hi, I'm using jQuery to toggle the visibility of a <div> using the jQuery toggle method. The toggle is fired on the mouseenter and mouseleave event, thus creating the effect of the div to fold out on mouseenter and fold in on mouseleave. Problem is, if the user drags the mouse over the <div> a few times and then leaves the <div>, the di...

How to get element order number

Hello everyone, how can i get order number of some element by javascript/jquery? <ul> <li>Anton</li> <li class="abc">Victor</li> <li class="abc">Simon</li> <li>Adam</li> <li>Peter</li> <li class="abc">Tom</li> </ul> There is 3xli with abc class. Now I need to get order(sequence) number of Simon li. Thanks in advance ...

How to re-focus to a text field when focus is lost on a HTML form?

There is only one text field on a HTML form. Users input some text, press Enter, submit the form, and the form is reloaded. The main use is barcode reading. I use the following code to set the focus to the text field: <script language="javascript"> <!-- document.getElementById("#{id}").focus() //--> </script> It w...

Jquery live not working in IE

Hi, I have some code that works fine in FF but not in IE. I have read other posts saying that the Jquery live method does not support change events but I am using a click event. Here is my code, it is inside $(document).ready(function(): $("a").live("click", function(e) { alert("link clicked"); //do stuff }); I...

Concatenate String

Hi there. I have the following javascript function: <script type="text/javascript"> function quickCardRegister_OnCompleteSave() { publishContent('This is a description',#{imagePath},'http://www.lala.com'); } </script> The imagePath variable is populated with value: http://localhost/img/30_w130px.gif I'm having the follo...

is it ok to forget about people without javascript turn on?

I am currently building a new style ecommerce shopping cart to test various scenarios and get the best conversion rates. Alot of this will be Javascript based. So I am trying to establish whether we are now in a time where we can simply say we happy to drop support for people with javascript turned off? Thanks for your help help and a...

What JavaScript functions are supported by different browsers?

I want to know which sites can give me information on the list of JavaScript functions that are supported by IE/Firefox/Opera/Safari. ...

linked comboboxes in html

Basically my webpage has two comboboxes. First combo box is populated with data comming from MySql. There is a button Add to the side of combo box and when user selectes a item in combo box 1 , clicks on the Add button, that item should get added to the second combo box that is in the same page. Can anyone please tell me how to do this i...

Listen for keypress while iframe has focus?

Is there any way to listen for keypress events in a parent page while the iframe has focus? Or, alternatively, is it possible to pull away the focus from the iframe? Please note, the iframe is not within the same domain, so I cannot modify it's contents via javascript. I've tried the following jquery in the parent page, thinking perhap...

limit the choices of acceptable inputs using javascript

Is it possible to prevent user from writing letters to a textbox (i.e. force user to enter only numbers in textbox) using javascript? ...

How does IE8 handle xml header.

I was wondering where I can find some information how IE8 actually handles xml header... for example how is handling <?xml version="1.0" encoding="utf-8"?> different to <?xml version="1.0"?>. Or how is handling processing node different in ie and other browsers. One other questions would be how FF handles those header. Is it any differe...

Differences between testing JavaScript and testing Ajax ?

hi all, i was wondering if there is any difference between performing tests on JavaScript, or Ajax? I understand that JavaScript is part of the Ajax equation, but is there any forms of execution differences when i am performing tests for JavaScript or JavaScript which is used to enable AJAX? Best Regards. ...

How can I retain carriage returns when I'm encrypting data?

I have this following setup, a textarea named with some data in it that may have carriage returns and another textarea that has style='display:none' in order to make it hidden as follows: <textarea id="myTextarea" onBlur="encryptMyData()"></textarea> <textarea name="encryptedText" style='display:none'></textarea> the user enters data ...

Step by Step validation with jquery validation plugin

I know its been asked many times already but no one could come up with solution so far. The idea is to have one form separated into few steps and validate each step on next click of the button. I know jquery validation plugin is offering quite complicated way of doing it with accordion but can anyone come up with a simple solution somet...