[jQuery] Re: Select all items in list on form submit

2010-01-15 Thread Richard McKenna
Thank you both for all your input changing to a click event on the button seems to have worked. I must have done something different this time as I tried that before posting here. Anyway thanks guys. On Jan 15, 1:17 pm, Amos King wrote: > Try tying in to the click event of the submit instead

Re: [jQuery] Re: Select all items in list on form submit

2010-01-15 Thread Amos King
Try tying in to the click event of the submit instead of the submit event. Just make sure to return false so the submit doesn't go off. On Fri, Jan 15, 2010 at 5:12 AM, Richard McKenna < richardofmcke...@googlemail.com> wrote: > So here's the full example. What it should do is select all the ite

[jQuery] Re: Select all items in list on form submit

2010-01-15 Thread Richard McKenna
So here's the full example. What it should do is select all the items that have been moved to the right hand side, then submit the form. http://67.199.29.196/selecttest.cfm On Jan 14, 9:27 pm, pedalpete wrote: > Can you give a bit more detail? > > Is the submit not firing? or the .each? > > I a

[jQuery] Re: Select all items in list on form submit

2010-01-15 Thread Richard McKenna
Thanks very much for your reply. OK following your advice I tried the following $('form#assignUsersForm').submit(function() { alert("submit fired"); $('select#assignedUserList option').each(function(i) { alert("each fired"); $(this).attr("selected",

[jQuery] Re: Select all items in list on form submit

2010-01-14 Thread pedalpete
Can you give a bit more detail? Is the submit not firing? or the .each? I always like to give my selectors an element+class/id, apparently it is more efficient, and I have noticed that some browses (it seems only sometimes) will miss some elements when only using the id/class. But throw some ale