jquery

Jquery sortable

function dropMembers() { $("ul.present").sortable({ connectWith: 'ul', containment: 'window' //containment: 'ADD_MEMBER_DIALOG' // sort: function(event, ui) { // var present_result=$("ul.present").sortable('toArray'); // // alert(ui.sortable); // } }); $("ul.us...

Change button in jQuery dialog box

Hi there, I wonder, if there is a proper way to remove the default close button in the title bar and change it with other, to which I want to assign other function than Close. I manage to change the classes, but despite that, the close function seems to override to any in the titlebar. My current code for changing classes: var closeBu...

Javascript/ jQuery and regex

I"m building a registration form, and I need to validate the user's inputs. (username, email, password). I have regular expressions set up for each of these, and I can easily validate each in PHP using preg_match, and if it returns false, I can display an error. However, I think it'd be much nicer if the page did not have to refresh to...

To see the content POST data trasferred by jQuery

How can you see what the attribute rel contains when it is transferred by POST? I transfer a variable by the rel attribute by jQuery. I would like to know what the attribute, $_POST['answer'], contains. This question is based on this thread. jQuery IRC tells me that the solution seems to be Firebug somehow. How can you see POST data i...

Jquery sortable element

Hi All, How to access the jquery sortable element. function dropMembers() { $("ul.present").sortable({ connectWith: 'ul', containment: 'window' //containment: 'ADD_MEMBER_DIALOG' // sort: function(event, ui) { // var present_result=$("ul.present").sortable('toArray'); // ...

The best way to handle a change in 'this'

A problem I regularly come across writing javascript using jQuery is that when a method of an object involves adding an event listener 'this' changes from being a reference to the object, to being a reference to the DOM element that triggered the event. Currently if I want to refer to the object from within the event handler I do someth...

Using POST in jQuery

How can you use POST in this command? var answer = $('#answer').val(); jQuery('div.answer_' + answer + ' a.delete_answer') .live('click', function(){ This should match this div.answer_answerExample a.delete_answer ...

jquery element sortable

How can i find out which element is selected for sorting ...

jquery disable sortable

Hi All , I want to disable sorting of source_element .how can i do so? function dropMembers(){ $("ul.present").sortable({ connectWith: 'ul', containment: 'window', items: 'li:not(.notSortable)' }); $("ul.usrlist").sortable({ connectWith: 'ul', dropOnEmpty: true, co...

How can I make a javascript variable and use it with jQuery

How can you make a javascript variable and use it with jQuery? I use the following command unsuccessfully in trying to get the POST data out of the var answer. I can access the variable in HTML by $_POST['answer']. var answer = $('#answer').val(); I use this variable in this code jQuery('div.answer_' + $answer + ' a.delete_answer') ...

A property grid in jQuery

I want to create a property grid like this: http://extjs.com/deploy/dev/examples/grid/property-grid.html However I don't want to use extjs, and am using jQuery instead. What plugin would most easily enable to me create a propertygrid? jqGrid is the only one that I know of right now. http://www.trirand.com/blog/ I am not interested in ...

Getting values from external input fields generated by jQuery

I will try to explain the situation as it is a little bit more complicated. I have created a multiple picture upload form. It works like this: In the form there are 2 submit buttons. 1 normal HTML submit button and another one is generated by jQuery. It is a "Browse" button which allows you to browse pictures on your HDD and add them ...

distance between 2 postcodes

I am using Google Maps API to get the distance between 2 UK postcodes. var yourPostcode = $("#YourPostcode").val(); var restaurantPostcode = $("#Postcode").val(); var point1 = GetPointFromPostcode(yourPostcode); var point2 = GetPointFromPostcode(restaurantPostcode); var distance = point1.distanceFrom(po...

Jquery Make Flash 100% fit to DIV

Hi Folks, I've managed to rewrite a script wich makes Images resize to 100% width of their parent Div Container To a Script that now lets Swf embed objects resize (Original Image resize Script by Oliver Boermans ollicle.c o m/eg/jquery/imagefit/ ) All i did is replaced the img with an "embed" in all lines where the parameters of the im...

Aptana Plugin for Eclipse and jQuery code assist

I want to use autocomplete for jQuery in Eclipse. The Aptana Plugin is installed: Aptana Web Development Tools Version: 1.5.1.25495-787Y07jbcbrChz-Tq2k383275 Support for jQuery also: Aptana Support for jQuery Version: 1.3.2.00005 JavaScript/WTP is installed: JavaScript Developer Tools Version: 1.1.1.v200906091427-77-FGBCcNBC-BeMcE...

Getting Django debug information when using Ajax call?

Is there a good way to get the debug information that Django provides when using jQuery to make Ajax calls? Right now when I make a call, I just see a http/200 server error in the python runserver window, but because the call is made through javascript, I don't get a debug page with all the information. ...

get json array back through javascript in jquery

Hey I have an external file in php, outputed as json format I want the data to be send back to jquery in arrays .... how to do it ? php: $options = "<option value="data0">data 0<option> <option value="data1">data 1<option> <option value="data2">data 2<option> <option value="data3">data 3<option> <option value="data4">data 4<option...

What should I do with form inputs' values when I hide the inputs?

These fields are hidden correctly, but what is the best way of setting the hidden field values. $j.registerType = { '' : $j([]), 'srotc_cadet' : $j('#vm_schoolstate_divContainer,#vm_srotcschool_divContainer,#vm_mslevel_divContainer'), 'srotc_intructor' : $j('#vm_schoolstate_divContainer,#vm_srotcschool_divContainer'), 'j...

serialize/unserialize in jQuery

Is there something like serialize/unserialize PHP functions in jQuery? These functions return a string representations of an array or an object which can than be decoded back into array/object. http://sk2.php.net/serialize ...

jQuery + hidden input fields

A simplified version of problem I am experiencing: Here is my HTML form: <form enctype="multipart/form-data" method="post" action="/controller/action"> <input type="text" name="title" id="title" value="" class="input-text" /> <input type="hidden" name="hidden_field" value="" id="hidden_field" /> <input type="submit" name="submit_form" ...