Re: Multiple submit button form
Re: Multiple submit button form
- Subject: Re: Multiple submit button form
- From: Q <email@hidden>
- Date: Thu, 2 Aug 2007 20:41:36 +1000
On 01/08/2007, at 2:31 AM, Pierre Bernard wrote:
Hi!
I have spent the 2 days battling with JavaScript libraries:
Prototype, Behaviour, jQuery, modalbox, ...
Some do marvelous things. Unfortunately there are also horrible
incompatibilities, silent failures, cryptic error messages ... Add
to that that I don't understand much of JavaScript and don't have a
debugger available.
I _almost_ won the battle. Final call will be on Monday! I might
still lose over an incompatibility between modalbox and Behaviour.
Back to the question:
One needs to GET or POST values for all form elements except for
INPUT elements. There should be a value for only one INPUT element:
the button one wants to see 'clicked'. WebObjects doesn't seem to
care what the value is. Well, I couldn't get it to work with a
WOImageButton. With a WOSubmitButton all is fine.
That is on the WO side of things. On the JavaScript side of things
it doesn't look so good. Prototype wants to encode all INPUT
elements which is no good. jQuery encodes correctly, but it seems
to be incompatible with Prototype. So it takes some coercing
Prototype.
You might want to have a read of this if you are having trouble
getting jquery and prototype to play nice together:
http://docs.jquery.com/Using_jQuery_with_Other_Libraries
Pierre
On Jul 30, 2007, at 11: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?
OK, what I want to do is to submit a form using JavaScript. And of
JavaScript I know very little. 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.
Can I grab the INPUT element's ID and somehow submit it along with
the form?
Pierre
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
--
Seeya...Q
Quinton Dolan - email@hidden
Gold Coast, QLD, Australia (GMT+10)
Ph: +61 419 729 806
_______________________________________________
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