Java bean variables are limited to only usage in the Server while
Javascript is mean to for the client. SO it is unlikely that you can use
the variable directly.
The only tow ways of doing it would be:

One is your way of using hidden fields.
The other is assigning the avlues to javascript variables itself directly.
Either ways you have to assign values to client side value holders.

Vinod



                    Sreenivasa R V
                    <sreenivas.ramnedi@        To:     [EMAIL PROTECTED]
                    WIPRO.COM>                 cc:
                    Sent by: A mailing         Subject:     JSP - Javascript
                    list about Java
                    Server Pages
                    specification and
                    reference
                    <JSP-INTEREST@JAVA.
                    SUN.COM>


                    05/11/00 12:36 PM
                    Please respond to A
                    mailing list about
                    Java Server Pages
                    specification and
                    reference





Hi,
    I want to use javascript in my Presentation.jsp. How can i use the
java bean variables in a javascript method.
    As of now i am declaring a hidden text field and then setting the
value using <%= .....%>. Then i am accessing the hidden text field value
in my javascript method. It becomes a tedious approach when the variable
list increases.

    Is there any other way of doing this???

Thanx in Advance,
Sreenivas R.V.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to