jquery

Prototype vs jQuery: A specific problem regarding binding, events and values

I'm looking at transferring existing functionality (built with PrototypeJS) to jQuery and have been working through a couple of examples. One example I'm a bit stuck on, specifically with regards to binding functions (and values) to an event. This example tries to apply a mouseover event, with an incremented value to a list of links. Th...

jQuery autocomplete returns empty list if no text in textbox

I am using jQuery autocomplete with a textbox under asp.net mvc 2, and everything works fine. I type in a search and it returns a list of results. But if I type some characters then backspace and erase all the text out of the text box I want a default list of items to appear. Unfortunatley the ajax call to my controller does not get fire...

jquery dynamic input field on select option onchange..

How can i poppulate the student name, roll and marks upon selecting the student subject based from select onchange event using jquery. Thank you so much. My views.py def add_student(request): subject = Subject.objects.all() if request.method == "POST": obj = Student() obj.name = request.POST['name'] ...

How to extract a string from a url.

Hi, I have url that looks like this... http://www.example.com/accounts/?token=111978178853984|683b8096732be7fd725d3332-557626087|m9lSbmoYhZ6Yut4OC3smY1fRf1E. from the token 111978178853984|683b8096732be7fd725d3332-557625434|m9lSbmoYhZ6Yut4OC3smY1fRf1E 557625434 is the id number. How can I extract the Id no from token using javascr...

Anyone experience timeout of jquery ajax request when using jqtouch the first time a page loads?

I'm building an iPhone web app using jqtouch. I setup an unordered list so that each row, when tapped, generates an ajax request to save the current location so it's associated with data in that row. The $.ajax request times out the first time after the app has loaded. This happens every time when run on the iPhone. It does NOT happe...

script works, but the clicked radio isn't checked=checked jquery ajax POST

to see the error: http://jsfiddle.net/sEdGz/2/ //the script works, but the clicked radio isn't checked=checked //mysql and php works good $('#form1').live("click change", function() { .... <div class='divtoclick'>neu berechnen</div> <form id="form1" method="post" name="bestellformular"> <input value="101" name="flyer_anzahl" ty...

Jquery uploadify plugin

Hello, I kept one jquery uploadify plugin on page and one <img> tag besides it. Everything works fine as expected except one problem. I want to update <img> to show the new image as soon as some image is uploaded. How can i do this? I am using Php. Thanks in advance :) ...

jQuery UI datepicker preventing highlighting of today's date when defaultDate is also specified

Hi, I have two datepicker inputs. One is a 'from' date and one is a 'to' date. The criteria for the from date is that the user can pick a date from today's date to 10 days ago. the issue i am encountering is that both today's date and the date of 10 days ago are highlighted. I would like to just highlight the date of 10 days ago but...

jQuery /Javascript - json to string variable dump

Is there a quick function to covert json objects received via jQuery getJSON to a string variable dump (for tracing/debuggin purposes)? ...

jQuery parent selectors

Is there a jQuery parent selector that traverses up the DOM until the first match is found? Eg: <tr> <td> <div id="foo">hello!</div> </td> </tr> to find the row from the div I am using: $('#foo').parent().parent(); It feels like I should be able to write something like $('#foo').firstParent('tr'); but I can't find...

External jQuery in Google Closure compiled JS?

My markup: <script src="http://somecdn.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt; <script src="/js/mycode.closure_compiled.js"></script> My code: goog.provide("mycode"); mycode.foo = function () { jQuery("#ajaxSpinner").show(); jQuery.get("/ajax/foo", function () { /* ... */ }); } I want to compile my code with advanced o...

Flexigrid with IE6 show only headers [SOLVED]

I'm using flexigrid with jquery-1.2.3.pack.js, works fine with firefox but when i try ie6 it show only headers. Searching on the web i've found a discussion on the same bug, and it says to comment this line from flexigrid.js: if (p.width!='auto') g.gDiv.style.width = p.width + 'px'; Tried with this but it dont show the grid anyway.....

Parsing valid url from long string with pure js or jquery using regex

Hi all, i get a longString from object's onclick value var longString = String(this.onclick); output like below; function onclick(event) { window.location.href = "index.html?q1=v1&g2=v2"; } i want parse that like below; index.html?q1=v1&g2=v2 how can i do this with pure js or jquery which works with all browser? Thank you fo...

JQuery - hour spinner

I need to use the JQuery spinner for hours so the template will be: 00:00:00:00 Currently the spinner is set only for numbers. How can I do it? ...

jQuery animation not happening when followed by a dequeue event

I'm trying to display an image while I'm doing some Ajax updating (which I've placed in a queue). Here's the code $(".SaveButton").click(function () { $(".SavingImage").fadeIn("fast"); $(this).dequeue("Updates"); $(".SavingImage").fadeOut("fast"); $(".ResultItem").data("isDirty", ...

JQuery Tab Events Triggers

Hi! I want to see tab No. 2 when "IF Condition" will meet the requirements. Here is my code. Please advice me how can I do this. Thanks Shahid <?php //Authorization / Security session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="h...

.checked=true not working with jquery $ function

hi all... i want to select a checkbox when a button is clicked. <form action="" method="post" id="form2"> <input type="checkbox" id="checkone" value="one" name="one" /> <input type="button" value="Click me" id="buttonone"/> </form> when i tried the following, the checkbox was not getting selected $('#buttonone').click(functi...

jQuery Ajax call No element found issue

I am getting a javascript error on firefox 3.5, when trying to call an ajax method. Please find the error below: XML Parsing Error: no element found Location: moz-nullprincipal:{1a2c8133-f48f-4707-90f3-1a2b2f2d62e2} Line Number 1, Column 1: ^ this is my javascript function: function Update(Id) { $.ajax({ type: "GET", ...

Jquery .Get() pulls NULL in Internet Explorer

Hello everyone, I have a problem with an AJAX call in JQuery. It works on Chrome, FF, and Safari, but not IE. In fact in IE nothing happens at all, no errors, no data loaded. Here is the code: $(document).ready(function() { $.ajaxSetup({ cache: false }); $.get("ShoppingCart2.aspx", { }, function(data) { //...

remove selected attribute of first selected element in select tag?

i have a multiple select tag, look at script please <select multiple="multiple" size="5" id="cities_select"> <option value="1">city1</option> <option value="2">city2</option> <option value="3">city3</option> <option value="4">city4</option> <option value="5">city5</option> <option value="6">city6</option> ...