• 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
Re: Referencing WO fields in JavaScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Referencing WO fields in JavaScript


  • Subject: Re: Referencing WO fields in JavaScript
  • From: Arturo Perez <email@hidden>
  • Date: Tue, 25 Oct 2005 09:29:55 -0400

Is there anyway to get WO to generate the ID the way it generates the NAME? I realize that sometimes you need to know the ID but there are many cases (WORepetition) where you cannot make the name unique without some help from WO.

I imagine people will say "bind to a method returning a string" but how then does one consistently generate the same ID for same element? Can the contextID be used?

-arturo

Seejo Pylappan wrote:
Add a attribute called id to the WOPasswordField in the inspector. Give the id a unique name. Then from the javascript you can use:
aVar = document.getElementID('unique_name').value;


Hope this helps.


On Oct 25, 2005, at 9:10 AM, Stresing, Stephan wrote:

Hi,

we want to implement a low-level validation (and some security things) of a WOPasswordField and here's my question:
how I can refer a dynamic WOPasswordField in an embedded JavaScript routine?


Usually we'd do it in JavaScript like this: aVar = aField.value;

Can I refer to the WO name "3.7.2.2.1.5.3.11"?

Do I have to assign a "name" in the bindings of the WOPasswordField? Obviously I'd prefer the WO notation (like 3.7.2.2.1.5.3.11)...


Snippet from generated HTML:

<input size="7" maxlength="6" type=password name="3.7.2.2.1.5.3.11">


Associated .wod:

MyField: WOPasswordField {
        maxlength = 6;
        size = 7;
        value = myValue;
}

TIA!

Many regards,
    Stephan.

Stephan Stresing
_______________________________________________
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: Referencing WO fields in JavaScript
      • From: Seejo Pylappan <email@hidden>
References: 
 >Referencing WO fields in JavaScript (From: "Stresing, Stephan" <email@hidden>)
 >Re: Referencing WO fields in JavaScript (From: Seejo Pylappan <email@hidden>)

  • Prev by Date: Re: Referencing WO fields in JavaScript
  • Next by Date: Re: Referencing WO fields in JavaScript
  • Previous by thread: Re: Referencing WO fields in JavaScript
  • Next by thread: Re: Referencing WO fields in JavaScript
  • Index(es):
    • Date
    • Thread