• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help on form submit

 
Maan Suraj
Ranch Hand
Posts: 299
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a form which has a submit button. On the click of submit two things should happen

1)It should make an ajax call, hit the server and get some response as a popup to the user.The user sees multiple values in popup, and he selects say one value from multile values(say) displayed in popup.

After selecting the value from popup, popup disappers and he hits the submit button again

2)Now normal flow should happen.Normal flow means that it should look into action tag to decide which servlet to call etc etc. (Pt 1 happens only for the FIRST time)

How do i make it work. Please help (using jquery for Javascript, ajax etc)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33674
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maan,
It sounds like you are asking someone to write code for you. What have you tried so far? For example, you know you need jQuery. What code did you write for the AJAX part and what error did it give you?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, the jQuery Forms plugin will help you Ajax-ify the form easily.
 
Maan Suraj
Ranch Hand
Posts: 299
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI Jeanne, I am asking how to go about it...If it would have been an error, I WOULDNOT have explained you the whole scenario. I am not sure at all how to go about it, i mean how to make both these thing happen on submit button I request you to read the question completely and reply.

BTW thanks Bear
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried so far? So far it sounds like you just need a flag that indicates whether or not you've gone "past" the first stage, so a function that sets the flag and opens the popup might be enough.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic