Hi Pal,
I tried your solution, but it is giving javascript syntax error for the below
line
var myDynamicValue = <%= myBean.getMyValue() %>;
Can someone give the reason for this.
Thanx,
Sreenivas R.V.
Pal Brattberg wrote:
> Absolutely, just insert the values directly in the JS.
>
> <script language="JavaScript1.2" type="text/javascript" defer>
> <!--
>
> var myDynamicValue = <%= myBean.getMyValue() %>;
>
> function init()
> {
> alert("myDynamicValue: " + myDynamicValue );
> }
>
> //-->
> </script>
>
> :: pal :: : : .
> _______________________________s_p_r_a_y_
>
> Pal Brattberg | [EMAIL PROTECTED]
> Mob: (+46) 0704 566299 | Tel: (+46) 08 52790122
>
> Har borjar internet | http://www.spray.se
>
> > -----Original Message-----
> > From: Sreenivasa R V [mailto:[EMAIL PROTECTED]]
> > Sent: den 11 maj 2000 09:07
> > To: [EMAIL PROTECTED]
> > Subject: JSP - Javascript
> >
> >
> > 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
===========================================================================
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