aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Need help on form submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Need help on form submit" Watch "Need help on form submit" New topic
Author

Need help on form submit

Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 299
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)


Man Suraj
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

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?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

By the way, the jQuery Forms plugin will help you Ajax-ify the form easily.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Maan Suraj
Ranch Hand

Joined: Dec 20, 2007
Posts: 299
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

Joined: Sep 29, 2008
Posts: 12617

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.
 
Consider Paul's rocket mass heater.
 
subject: Need help on form submit