• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WO and Javascript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: WO and Javascript
      • From: Helge Staedtler <email@hidden>
  • Prev by Date: Re: SubComponents and Submits
  • Next by Date: Re: WO and Javascript
  • Previous by thread: Re: NSProperties order of priority (app/framework/command line)?
  • Next by thread: Re: WO and Javascript
  • Index(es):
    • Date
    • Thread