Hi,
I am kind of new to ECS and I apologize in advance in case I write something 
stupid.  I think this is the problem, though.  The setOnChange method does 
not return a reference to the Select object.  When the compiler tries 
verifies that the final value of the statement is a Select object, which can 
be assigned to the select variable, it sees that the setOnChange method 
returned a void.  So, the statements can't be chained together and must be 
done as a separate step.

    Select select = new Select()
                   .setName("select");

    //foo() would be some function
    select.setOnChange("javascript:foo();");

I noticed in the API documentation that some of the set methods return a 
reference and some don't.  Is there a design reason for this?


Patrick



----Original Message Follows----
From: "Hardy, David" <[EMAIL PROTECTED]>
Reply-To: "ECS" <[EMAIL PROTECTED]>
To: 'ECS' <[EMAIL PROTECTED]>
Subject: Javascript onChange= for select boxes
Date: Tue, 21 Dec 1999 15:30:18 -0500

Hello,

Would appreciate any guidance on how to add a Javascript call to a select
box, something like:

    <input type=select name=select onChange="myJavaScriptFunction()">

    Select select = new Select()
                   .setName("select")
                   ??? .setScript ???

Thank You in advance,

Dave.



--
------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



--
------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to