HighDots Forums  

Check form before submit with ajax

jQuery jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.


Discuss Check form before submit with ajax in the jQuery forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
BMnt
 
Posts: n/a

Default Check form before submit with ajax - 11-06-2009 , 05:28 PM






I'm building a web form with containing 3 fields. When the form is
submitted a search is done in a database, everything is ok.

Now, in order to help the user, I would like to display on the form
the number of results he will get if the form is submitted.
What's the best way to get this behaviour?

With a single field it's quite easy ($.get or $.load), but when I add
multiple checkboxes or multiple select, the construction I cannot
build the request anynmore...

Can someone give me some hints to build my form?

Thanks,

Reply With Quote
  #2  
Old   
Salvatore FUSTO
 
Posts: n/a

Default R: [jQuery] Check form before submit with ajax - 11-07-2009 , 04:12 AM






Use the $.ajax() function: in it among other you can specify a structure of
data to pass to your action page


-----Messaggio originale-----
Da: BMnt [mailto:bmontereau (AT) gmail (DOT) com]
Inviato: venerd́ 6 novembre 2009 23.29
A: jQuery (English)
Oggetto: [jQuery] Check form before submit with ajax

I'm building a web form with containing 3 fields. When the form is
submitted a search is done in a database, everything is ok.

Now, in order to help the user, I would like to display on the form
the number of results he will get if the form is submitted.
What's the best way to get this behaviour?

With a single field it's quite easy ($.get or $.load), but when I add
multiple checkboxes or multiple select, the construction I cannot
build the request anynmore...

Can someone give me some hints to build my form?

Thanks,

Reply With Quote
  #3  
Old   
BMnt
 
Posts: n/a

Default Re: R: [jQuery] Check form before submit with ajax - 11-09-2009 , 06:42 PM



Hi Salvatore,
Thank you for your response. Do you have a basic example to see how to
use this function?
Regards,
BMnt

On 7 nov, 10:12, "Salvatore FUSTO" <ing.fu... (AT) gmail (DOT) com> wrote:
Quote:
Use the $.ajax() function: in it among other you can specify a structure of
data to pass to your action page

-----Messaggio originale-----
Da: BMnt [mailto:bmonter... (AT) gmail (DOT) com]
Inviato: venerd́ 6 novembre 2009 23.29
A: jQuery (English)
Oggetto: [jQuery] Check form before submit with ajax

I'm building a web form with containing 3 fields. When the form is
submitted a search is done in a database, everything is ok.

Now, in order to help the user, I would like to display on the form
the number of results he will get if the form is submitted.
What's the best way to get this behaviour?

With a single field it's quite easy ($.get or $.load), but when I add
multiple checkboxes or multiple select, the construction I cannot
build the request anynmore...

Can someone give me some hints to build my form?

Thanks,

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.