Re: Multiple submit button form
Re: Multiple submit button form
- Subject: Re: Multiple submit button form
- From: Chuck Hill <email@hidden>
- Date: Mon, 30 Jul 2007 14:40:30 -0700
On Jul 30, 2007, at 2:25 PM, Pierre Bernard wrote:
Hi!
Does anyone happen to know how WebObjects knows which button was
clicked to submit a form?
I do know that the INPUT element has an elementID and how this maps
to actions in invokeAction...
So it's not the WebObjects side of things I am worried about, it's
the HTML.
So when a form is submitted, by default it's form action URL is
called. But what parameter tells the server what triggered the
submission?
The name and value get added to the form values:
.woa/wo/3.0.13.1?
0.13.1.1.1.3.0=1234&0.13.1.1.1.5.0=&0.13.1.1.1.7.0=&datebox0_13_1_1_1_9_
0=&0.13.1.1.1.19=Search
That is from clicking the button with the text "Search".
OK, what I want to do is to submit a form using JavaScript. And of
JavaScript I know very little.
You should learn more. :-) Seriously, it is much, much better than
it was 5 or 7 years ago. It is really quite useful now.
There is stuff like: document.myForm.submit()
But what if I want to simulate the click of a button? I don't think
button.click() will do it as I want to attach my script to the
button, so this would be an infiite loop.
If it works like a hyperlink, you can return true from your script to
cause the button's original action to execute.
Can I grab the INPUT element's ID and somehow submit it along with
the form?
I'd guess so. Wonder's Ajax framework has Ajax submits. I never
bother to look at how they actually work...
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden