jquery

Can I use the Ajax Control Toolkit client side from jQuery?

This was according to me possible with the Ajax library. But that however seems to be obsolete? ...

Update value based on :checked status.

<input type="checkbox" name="feature1" value="0" /> If checked, value="1"; else value="0"; if ( $('input[name=feature1]').is(':checked') ) { $('input[name=feature1]').val('1'); } I think the above jQuery may work, but its one-time check, how do I make it that everytime the checkbox is clicked/checked, value becomes 1, else 0? Man...

jquery click event issues

Hello, I'm having some issues with .click() event under Internet Explorer and Chrome. So, I've got this menu of filters: <div id="filter-checkboxes" style="text-align: left; margin-bottom: 20px;"> <input type="checkbox" id="crop-checkbox" onclick="init_filter('crop');" /> <span id="crop-span">Crop</span> <br /> <input...

Enable/Disable other elements based on selection

<select name="feature1"> <option value="1">Enable</option> <option value="0">Disable</option> </select> <input type="checkbox" name="feature2" /> <input type="checkbox" name="feature3" /> How do I disable 'feature2' and 'featured3' inputs when 'disable' in 'feature1' is selected? Thanks ...

Jquery Ajax call with async returns null responseXML

Hi All, I have a simple javascript using Ajax API for fetching a XML from the server. function loadXML(path, node) { var response_obj = ""; /* Fire ajax request and get the XML */ var request_obj = ""; $.ajax({ async: true, type: "GET", url: path, dataType: "xml", success: functio...

jQuery: copying element attributes to another attribute of the same element

I've got a list of links, all in the same class, each with a custom argument ("switch-text"). My script should copy the text of the custom argument to the text of each link and replace it ("Pick A" should become "Pick A Please"). It works fine with only 1 link, but when I add several, they all get switched to the first argument. ("Pick ...

Calling function defined in jquery ajax response from calling page

hi there I am doing an ajax request to a php page ('test.php') inside of test.php is <script type="text/javascript"> function test() { alert('test'); } </script> <div id="abc">some normal content too</div> now this function is unique to each page load, i.e it is generated via php to do different things so, my question is how do i ...

Adding mouseOut time

How do I modify this script so that when I mouseout of the submenu, it still remains open for x seconds? Currently it slidesup (hides) as soon as I mouseout. I need hoverintent like functionality where it hides after x seconds. HTML: <div id="navigation"> <ol> <li><a href="#" class="parent">Menu 1</a> ...

How do I use jQuery or Ajax to swap the background image after a form is submitted?

I have a standard html form that uses a background image. I would like to replace the entire form with a confirmation image after the user clicks on the submit button, but I am not savvy enough with jQuery or Ajax to pull this off. You can see the form in the upper left here. Here is the html: <div id="freeQuote"> <form ac...

Copy/append ajax textarea response to another non-ajax textarea

Hello, I have ajax domain lookup script. Look here for DEMO: Here is JS code for Ajax form Textarea1 <script type="text/javascript"> //Specify the time to wait before checking var intervalToCheckForChange = 250; // in milliseconds, 300 = 0.3sec var request; var statusDivJS; var isAvailableDivJS; var domainInput; var domainsAvailabl...

Index of div element jquery

Hi, I have following html: <div class="rows"> <div class="row"><input type="text" onchange="javascript:getIndex(this);" value="" /></div> <div class="row"><input type="text" onchange="javascript:getIndex(this);" value="" /></div> <div class="row"><input type="text" onchange="javascript:getIndex(this);" value="" /></div> </div> ...

jQuery slideToggle variable duration

I have a function where I want the speed of the slideToggle to be dependent on how many children/list items are in the list "$(this).prevAll('.list_category:first')". Can someone tell me where I'm being stupid? $(".expand").click(function() { var iNum = $(this).prevAll('.list_category:first').length(); var tNum = iNum*100; $(this).p...

Saving temporary form information in global Javascript variables

Is there any reason why I shouldn't do something like the following (to avoid using a hidden field to store the temporary information)? I'm using jQuery syntax for brevity but it's a general JavaScript question. function editComments() { window.currentComments = $('#commentsTextBox').val(); $('#commentsTextBox').removeAttr("read...

Grab session variable from php page via jquery?

I edited my original text to demostrate my entire set of code for those that weren't understanding my question. All this works perfect when I had my database use MyISAM but when I changed over to InnoDB I now have to account for my foreign key or the mysql_queries won't successfully execute. I have the user_id in a session variable that ...

Struts2 + Struts2Jquery Plugin = Datepicker

Hi at all.. How can I set a different locale to my ?? I use Struts2 Jquery Plugin in bundle with MyEclipse 8.5, and I find some different locales, but I can't set it! Thanks in advice.. ...

jquery get querystring of loaded page in a div

hi everybody, I have a page with a form page loaded in a div. I'd like to send some data to the loaded page by querystring and read the content in it, is it possible and if yes how? that my example: $("#scheda_sch").load("./schemi/sch_"+schemi[indice]+".html?azione="+azione); I need to read from page sch_...html read the value of q...

Jplayer not working with some browsers (Probably has something to do with the swf player)

I have just set up Jplayer and it is working on chrome, but not on ie or firefox. I set up the demo first and it worked on all three browsers. I suspect it has something to do with the swf player, but I have no idea what is wrong. EDIT: Found out what was happening. In the Jplayer js, the swfpath was relative ("js/swfpath"), I changed ...

can i load javascript after rest of page loads

i have a section of a webpage that loads a javascript file from an external source and then kicks off an ajax query. when i load the page, i see the browser saying "waiting for xxx.com" alot so i think the dependency on this external javascript is slowing my initial page load. is there a way i can load this external javascript async so...

jQuery .click() doesn't work offline?

Hi everyone, I've bind .click events on some section headers, so that when a user clicks on one of those headers, the section appears/disappears. So far so good, but for some reason, when I go offline, that doesn't work anymore. I don't understand such a behaviour, could anyone enlighten me? Here's the code: <script src="jquery-1.4...

Passing an escaped String to JQuery($)-Function

Hi, currently I am trying to highlight elements on a page. Therefore I pass a comma seperate String to a Javascript-Funktion called highlight. highlight("main:box1,main:box2"); This was working fine till I found ids with : on the page. So I tried to escape them with a little regex. Here things started to get a little funny. If I esc...