[jQuery] a little problem with checking all checkboxes

2009-09-26 Thread jjshell
Hi, Please consider the code below, supposed to check all child checkboxes wjen a parent checkbox has been checked. Hi, Please consider the code below, supposed to check all child checkboxes wjen a parent checkbox has been checked. //parentCheckbox and childCheckboxes are two variables set e

[jQuery] Re: jqm and livequery issue

2009-07-30 Thread jjshell
isplayed in the alret box. On 29 juil, 16:46, Liam Potter wrote: > take the variables out of the quotes, you're just passing strings. > that should sort it out. > > > > jjshell wrote: > > Thanks for your answer. > > > I did it. Now livequery is applied as expe

[jQuery] Re: jqm and livequery issue

2009-07-29 Thread jjshell
#x27;,function(){ $('#modal-test').jqmShow(); return false; }); On 29 juil, 10:44, Liam Potter wrote: > uncomment the return false > > > > jjshell wrote: > > Hi, > > > Please consider the code below. It should open a modal everytime a > > lin

[jQuery] jqm and livequery issue

2009-07-29 Thread jjshell
Hi, Please consider the code below. It should open a modal everytime a link of a given class is clicked. But... it does not. //get the url of the link clicked var url; $('a.edit').livequery('click',function(){ url= $(this).attr('href'); }); //initiate the modal box $('#modal-test').jqm({ a

[jQuery] [jqModal]: sending ajax request, reload in same modal

2009-07-27 Thread jjshell
Hi, I am using jqModal (http://dev.iceburg.net/jquery/jqModal/#examples) to open a modal (some will argue it's an overlayed since I'm not forcing focus as code below shows). An html form is loaded using ajax. I'd like to submit this form and load the html response in the modal. Here's how I d

[jQuery] .load: how to make sure ajax-loader.gif stays visible until the injected html is actually visible?

2009-07-13 Thread jjshell
Hi, In the below code, the ajax-loader disappears before the html returned by .load is actually visible in the browser. How can I correct it? $.post("registerClient.php", data, function(returned){ $("#client").html(returned); $("#all-clients").load("allClients.php", function(){ $("span#

[jQuery] Re: checkboxes, array and $.post

2009-01-02 Thread jjshell
t's what serialize() is for: > > $(':submit').click(function(){ >     var data = $(this).parents('form:first').serialize(); >     // or $('#formID').serialize(); >     $.post("delete.php", data, function(){ ... }); > > }); > >

[jQuery] Re: checkboxes, array and $.post

2009-01-01 Thread jjshell
need to store them in an array anyway? The checked ones > values will be submitted with the form, and you can access them at > anytime with $(":checkbox:checked") > > On Dec 31, 3:52 pm, jjshell wrote: > > > > > Ok I'm getting closer... And thanks again for you

[jQuery] Re: checkboxes, array and $.post

2008-12-31 Thread jjshell
('nothing happens'); > > }); > > In the console, you will see the length of the wrapped set, the number > of inputs with class "item_id". > > Check the API again:  http://brandonaaron.net/docs/livequery/#api > > Also, $.each method is similar to a for-lo

[jQuery] Re: checkboxes, array and $.post

2008-12-31 Thread jjshell
The problem seems to be located around these parts: var CheckedIDs = []; $("input.item_id").livequery('each',function(add) { if (this.checked){ alert('push'); CheckedIDs.push($(this).attr("value")); } }); On 31 déc, 15:26,

[jQuery] Re: checkboxes, array and $.post

2008-12-31 Thread jjshell
      "delete.php", >          item_ids: CheckedIDs.join(","), >          function(data) { >               //Handle the returned results >          } > > } > > "delete.php" will see a comma delimited string of IDs to delete > > On Dec 31, 7:11 a

[jQuery] checkboxes, array and $.post

2008-12-31 Thread jjshell
Hi, I have a tabular data I need to be able to delete by selecting checkboxes, and submitting a form (a .php script then checks which checkboxes have been submitted, delete by id, return an updated list of the items injected into the dom). My problem is that I currently can't manage to gather th

[jQuery] Re: .load quircky

2008-12-30 Thread jjshell
r delete.php?... is executed.  If I'm understanding > you correctly, you want it to load AFTER delete.php has run its > course.  Is this what you intended? > > Cheers. > > Joe > > http://www.subprint.com > > On Dec 30, 10:14 am, jjshell wrote: > > >

[jQuery] .load quircky

2008-12-30 Thread jjshell
Hi, Please consider the code below: $(document).ready(function(){ $("div#display").load("display.php"); }); $(document).ready(function(){ $("a.test").livequery("click",function(event){ var id = $(this).attr('id').substr(1); $("div#status").html(''); $("div#status").lo

[jQuery] [livequery] strangeness

2008-12-19 Thread jjshell
Hi, I'm loading a page reloaded every x seconds is injected into the dom (#reloaded). The page in question contains links of a certain class (.loadNewPage). Clicking on a loadNewPage link will load another page in another div (#edit). Since the links are the result of a page loaded into the dom,

[jQuery] rewrite these few lines of code

2008-11-09 Thread jjshell
Hi, Here's a bit of code I have: function getContent() { $("div#content").load("content.php", '', reload); } function reload() { setTimeout("getContent();", 1000); } $(document).ready(getContent); I'd like to rewrite so as to include the functions within the document ready part: $(document)

[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread jjshell
Thanks a lot for your reply and time :) It's all clear now.

[jQuery] form submission and error messages: what's your approach?

2007-12-21 Thread jjshell
Hi, Initiating myself to Ajax, I cam to wonder one important thing: How do you guys handle error messages in the context of a form submission? So far, I have always proceded like this: The fields are treated server-side. If a problem is detected, I return the page to Client (with persistant con

[jQuery] Re: using AJAX with jQuery

2007-12-21 Thread jjshell
First of all, thanks for your time and answers. I really appreciate it. Having made a few tests, the $.ajax approach seems the one that fits the most my application. Just a few questions: 1. Can you avoid to explicitely name each field of your form? data: "test=" + $("input[name=test]").val(), W

[jQuery] using AJAX with jQuery

2007-12-20 Thread jjshell
Hello, I'm new to jQuery (and AJAX for that matter). Even if the library is really easy to use, I'm still having problems "ajaxing". I'd like to understand how to post the following simple form to the server, and send a message to the client depending on the submission process output (telling him