jquery

jQuery: Get request (GET/POST) parameters from ajax request in Javascript

I am using jQueryUI dialog to open a modal form on my site. The form has a hidden input to pass on an affiliate code that is passed in the query string, like http://mydomain.com/page1_with_form?affiliate=Chuck%20Norris http://mydomain.com/page2_with_form?affiliate=Chuck%20Berry I am using a jQuery plugin to make grabbing the GET valu...

How do I make a select .change event not fire until it loses focus (using jquery preferably)?

I have a select box using the dropdownchecklist jquery plug-in. I want to have a change event fire only after the select box loses focus. The jquery .change event fires for select boxes immediately upon selecting an item in the list. In my case since multiple items can be selected I only want the change to fire after focus is lost a...

Mysterious Orphan Text

I'm using a sliding the [jquery.hslides.js] plugin for a project... I've never seen anything like this but when I changed the overall width of the sliding container, out of nowhere I have these orphan bits of text floating around. I have ZERO clue where they came from... they're not selectable. You can see them here: http://cld.ly/821d...

Quick way to clear all selections on a multiselect enabled <select> with jQuery?

Do I have to iterate through ALL the and set remove the 'selected' attribute or is there a better way? ...

JQuery Animate Delay Problems

Below is the HTML & JQuery code I have: HTML I have: <div class="announcement"> <img id="imgBanner" style="cursor: pointer;" onmouseover="showPopup();" /> </div> <div id="divArrow" class="arrow"> <img id="imgExpandContract" style="cursor: pointer;" alt="Arrow" border="0"onmouseover="showPopup();" /> </div> <div id="window"> ...

I'm trying to finish an animation in an each loop before starting the next one

Here's a sample: http://jsbin.com/idepo/5 The padding and everything seems to look better when not using that, but oh well. My question is, if you click one of the menu items (right now, only the left most one will do anything) then a list of sub menu items slides down. What I would like to do is have one slide down, then another slide ...

help with a jquery selector

I've got this dom: <a class='foundTag' id=261 href=''> <span class=name>wimbledon<\/span> <span class=subscribers>(0)<\/span> <span class=threads>(0)<\/span> <\/a> <a id=263 href=''> <span class=name>wini<\/span> <span class=subscribers>(0)<\/span> <span class=threads>(0)<\/span> <\/a> It's 2 links, the first o...

Jquery Dynatree plugin - how to get children of a given node

I looked through documentation and there seems to be no way to get an array of children of a given node... something like if (parentNode.hasChildren() == true) { alert('yay'); if (parentNode.children == null) { alert('what the???'); } } this code will output 'yay', (i use a node that has childre...

Figuring out when a XMLHttpRequest request was made without callbacks

I'm trying to overload the XMLHttpRequest.* method in JavaScript so a webpage can figure out if an Ajax request took place without using any intrusive callbacks. Now, something like this works relatively fine when using most JS frameworks: XMLHttpRequest.prototype.getResponseHeader = function() { alert('O hai, looks like you made an AJ...

Print the contents of a DIV

Whats the best way to print the contents of a DIV? ...

easiest way to show "loading" when using jquery ajax?

I want to know the easiest way of showing a 'loading' gif to a specific jquery ajax request. i have tried: $(document).ajaxStart(function() { $('.hideOnLoad').hide(); }); $(document).ajaxStop(function() { $('.hideOnLoad').show(); }); but then ALL ajax requests will trigger it. i just want a specific jquery ajax request to tri...

Need help with creating image upload form

Hi, I'm not really gr8 with ajax and javascript so I ask for help. Here is the deal, I have the image form upload working the old fashion way: <form action="db/photo/do_upload" method="post" enctype="multipart/form-data"> <fieldset id="upload_form"> <input type="file" name="userfile" size="20" /> </fieldset> <button type...

Jquery with SMARTY and JSON

table department(department_id, name) table category(category_id, department_id, name) I want to implement the idea that when i change department in drop down list, all categories will change according to the department value It 's my jquery script {literal} <script type="text/javascript"> $(document).ready(function(){ $('#departmen...

Django return a single record as JSON

Hi, I created a form for adding notes about a customer in our web admin. I am using jQuery and Ajax to submit the for. I would like the Django view to return the newly added note/record so I can append it to the customer notes table. My Ajax send is working, and the note is being saved, I just can't display the result. I have tried the...

jQuery dynamic form creation in IE8 not working with large amounts of data

At work, we have a report that is generated with IP's in it. There is a link you can click on in that report that will open a new window and call a script which brings up a google map with pin points to where each IP originates from. Depending on the report, it can return a lot of IP's (around 150 at times). So, in order for this to wor...

jQuery animate() to position issue

I'm just working on my personal website, giving it a bit of a revamp. I've implemented a sort of 'accordion' menu feature, where if a menu button is clicked, the "non-clicked" buttons disappear, and then the clicked button is moved to the top of the list, where then a panel animates down in which I will be putting text content. In Fire...

Using jquery ajax and omitting a value for the form action attribute

I've created an ajax sign up form using jquery to a PHP backend. My question is whether it's prudent to leave the form attribute action="", that is between blank quotation marks and let the ajax interface handle everything. Are there any pitfalls to this method if I'm not interested in users with javascript turned off? $('#signUp...

jQuery Pagination - how to adapt to a different format

Hey everyone, I decided to use the tutorial over at PacktPub mainly because I didn't need all the features of DataTable and I didn't want to have to spend a lot of time trying to get it styled exactly how i wanted it. My problem with this tutorial is the pagination. I dont want it to look like this: 1 2 [3] 4 5 Instead I want it to ...

Directly accessing server database via Ajax (without PHP or some other intermediate)

With powerful frameworks like jQuery, it seems to be possible to build an entire app logic on the client side. It's very much analogous to building a client app as a native program. Now suppose this client app needs to access a remote database. The usual solution seems to involve the layers Ajax/PHP/MySQL. It seems to me that the PHP l...

Using max-width = 100% and max-height = 100% on an image, calculate the display width/height

I am creating a slideshow for images of various sizes to display centered vertically and horizontally within a canvas area. In my CSS, I set the width and height of the image to 100% so that each image would proportionally fill the canvas. I want the canvas to auto-size itself to fit within the viewer's screensize as the original size o...