jquery

Manipulate main frame from iFrame with jQuery?

Hey! I am cheating a bit with iFrames to create an illusion of AJAX-uploading. When the upload is complete I need to communicate information about the file that was uploaded to the main frame and list it. If I have the following UL in the main frame and a JS-variable in the iFrame named filename, how can I append file_name to the list?...

Value of variable changes once out of the click function in jQuery.

Hi, this is the continuation of my previous question. Since I just logged in that day without an Open Id, I don't know how to login to that account and edit further. So I created a new Open Id enabled account and posted this as a new question. Now I have the code like this. Inside the onclick event, the value is stored in the $selected...

Trouble refreshing iframe with javascript

This used to work, but for some reason it doesn't anymore. I use a javascript to change the source of an iframe and then refresh it. The reason is I want to send a variable into the iframe before it is viewed. I added som debug code, and it shows "debug 1" but not "debug 2". What might be the issue? $("#upload_iframe").attr("src", "/e...

JQuery Sortable & Clone

I got stuck into problem since 2 days. Here we have drug and drop and we want to do clone items from right box to left. If i use draggable, it works, but all droped items is no more possible to delete after drop ??? If i use both sortable, there is not posible to clone (sortible dont support clone) ??? How can i resolve this. is it b...

Using the Jquery closest() function?

Hi guys, Currently got this JQuery code... $(document).ready(function(){ $(".r3c").hide(); $('.show_r3c').click(function() { $(this).closest('.r3c').toggle(); return false; }); }); And here's my HTML: <tr> <td class="show_r3c">click here</td> </tr> <tr class="r3c"> <td>This is what I'd like to display</td> </tr> F...

Jquery drag and drop across two divs

Hi all, I have two div's that are sortable within the div's and i also want to drag n drop them across the two divs.Can anyone tell me how can i do that. For example i have two list of members in two divs i want them to be draggable n droppable in across the divs. thanks ...

jQuery: Loading an external page using AJAX, then calling insertAfter() into table row

I'm trying to load some content into a table using insertAfter(), but the content I'm trying to load is html (output from an asp.net page) that I'm getting using AJAX.Load(). From my understanding, insertAfter() works like this: $("htmlcodehere").insertAfter("selector"). AJAX.Load() works like this: $("selector").load("Html/file"). ...

radio button change style on checked

i have a set of radio buttons. <ul class="ProductOptionList"> <li> <label> <input class="RadioButton" type="radio" value="157" name="variation[1]"/> Lemon (200 ml) </label> </li> <li> <label> <input class="RadioButton chosen" type="radio" value="160" name="variation[1]"/> Lemon and Herbs (200 ml) </label> </li> </ul> i want to highli...

JQuery preserve draggability when element is removed.

I'm trying to move a draggable element around in the DOM, but whenever I try replaceWith() or remove() or similar functions, its draggability is lost. Is it possible to make an element not lose its draggability when moving it around in the DOM? ...

jQuery plugin to show the contents of a specific div on an external page??

Scenario: Say I am on an invoice details page. I have a customer name label and I want to be able to load customer details into a popup tooltip on mouseover of the label. The contents of this tooltip should come from the contents of a specific div on an external page, for example: ExternalURL: Customers.aspx?CustomerID=224 ExternalDI...

jquery plugin for dropdown from select or list

I need a lightweight jquery plugin to build up a dropdown. I need this to work with both a source <select> or <ul>, this could be one or two separate plugins. The dropdown displayed needs to display the contents in multiple columns - I've only seen one plugin do this (http://www.givainc.com/labs/mcdropdown_jquery_plugin.htm) which is a g...

How to improve this jQuery toggle method

Hi, I'm trying to learn jquery, I've some basics of javascript. I've written this piece of code to toggle between 3 functions, it works fine <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"&gt;&lt;/script&gt; </head> <style type="text/css"> .format1{ background: red; } .f...

Navigate dom using jquery to get at specific elements

I am trying to use jquery's parents/siblings to find particular input elements but I cannot seem to get this right. I have the following HTML: <div id="ExtrasOptions"> <div class="selectItem"> <div class="selectPrice"><span>Qty: <input name="qty" type="text" value="0" maxlength="2" id="qty" class="AccessoryQuantity" /></span></div...

Binding a form variable in jQuery

I'd like to compute a value and carry that computation in the form post, so what I do is: <form> <input name="myID" id="myID" type="hidden" /> </form> $('#myID').attr('value',myCalculation); What I would like to do is display it as well, so I've added: <div id="myIDdisplay"></div> $('#myIDdisplay').text(myCalculation); Is there a b...

Why Javascript calling to Page WebMethod results in "500: Unknown web method"?

I have a page with this method in CreateTicket.aspx.cs: [WebMethod()] public static string Categories() { var business = new CategoryBusiness(); var categories = business.ListRootCategories(); return categories.Json(); } And the javascript/jquery code on the page (same page, .aspx): function LoadRootCategories() { Pa...

Jquery , Ajax and ASP.NET webmethods

Using query ajax to call a webmethod in an ASP.NET page works well if the HTTP request is a POST. If a HTTP GET request is used the Page_Load event runs instead of the webmethod. Any ideas? Here is the Ajax $.ajax({ type: "GET", url: "http://local.proleaguesports.pagefad.com/AjaxTesting.aspx/receivermethod", dat...

Using jQuery to only show one of a pair of elements

I have a number of message elements that come in pairs: If element A1 is shown, then A2 should be hidden, same for B1/B2, C1/C2, and so on. I have the jQuery code working, but it gets verbose: if (conditionA) { $("#a1").show(); $("#a2").hide(); else { $("#a1").hide(); $("#a2").show(); } if (conditionB) { $("#b1").s...

jQuery drag n' drop won't let me drag outside of a scrollable div?

ok i've got a table with drag and drop classes in a div that has it's overflow set to "auto", this allows me to hide part of a schedule and only puts a scroll bar on the bottom. however, i just created some droppable elements outside of the scrollable div and my draggable elements can't leave the scrollable div. any ideas? ...

Are there hosted jQuery UI themes anywhere?

I'm using Google-hosted jQuery and jQueryUI, but I'm wondering if there are hosted jQueryUI themes anywhere? I'd like to just point to a hosted CSS file (the same way I do with the hosted JS file), so that I don't have to worry about setting up directories for the widget images or the CSS files or anything like that. Update I've found...

JQuery Validator Updated Password

I have a form which have three fields Old Password New Password Confirm Password These fields are optional and only mandatory when user enter some text into New Password How can i apply jQuery Validator plugin for the same. jQuery.validator.addMethod("pass2", function(value,element,param) { var op=document.forms[0].oldpa...