• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help on form submit

 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic