WO and Javascript
WO and Javascript
- Subject: WO and Javascript
- From: Wolfram Stebel <email@hidden>
- Date: Tue, 29 Nov 2005 16:42:08 +0100
- Thread-topic: WO and Javascript
Hi list,
after searching and testing a lot, i finaly have to ask:
I have normal WOComponents using submit buttons for saving data etc.
I want to validate via javascript that the user is sure to DELETE data.
For this i created a javascript funtion that is bound to a delete buttons
"onclick".
So far OK. But now i need the value of the confirm ( "are you sure?" )
inside my WOComponent.
I tried several thousand permutations of bindings, code etc.
At the moment i have a variable "confirmed" in my component.
I bound it to a hidden WOTextField with ID "confirmed" and try to get the
value with
aVar = this.document.Form1.getElementID("confirmed").value;
where Form1 is a binding "name" i attached to my WOForm.
It does not seem to execute this code correct, i do not reach another alert
("did it") after this code.
At last i wont to return the value with:
if ( check )
this.document.Form1.getElementById("confirmed").value = "true";
else
this.document.Form1.getElementById("confirmed").value = "false";
which doesnt work either.
I expected the binding "confirmed" to be synchronized on the way back to the
server.
Any straight receipes how to return values from javascripts into a
component?
One thing i found searching the web is, that Chuck has a chapter on
javascript in his next book. Should i wait for it? :-)
TIA
Wolfram
_______________________________________________
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