If you are NAS 4.0 it comes with a nice bug...
The work around..
Start your script tag like this
<scr<%="i"%>pt>
... you javascript <%=string%> your javascript...
</script>
Dont ask me why this solves the problem, but I know that it does !!
Regards
Sandipan.
Peter Gozal wrote:
>
> Maybe you should remove the + sign before
> and after the string so it look like this:
>
> var cCW =
> window.open("/addinfo/currency.html?price=<%=string%>,currencyConverter","HE
> IGHT=400,WIDTH=400");
>
> I tried this code bellow and it works just fine.
>
> <%@ page language="java"%>
> <% String string = "MyString" ;%>
> <html>
> <head>
> <script>
> var cCW = window.open("/addinfo/currency.html?price=
> <=string%>","currencyConverter","HEIGHT=400,WIDTH=400");
> </script>
> </head>
> <body>
>
> </body>
> </html>
>
> If open the source window from my browser I got the result
> as expected:
>
> <html>
> <head>
> <script>
> var cCW = window.open("/addinfo/currency.html?
>
> price=MyString","currencyConverter","HEIGHT=400,WIDTH=400");
> </script>
> </head>
> <body>
>
> </body>
> </html>
>
> Maybe I misunderstood your question...
>
> Regs.
>
> Peter Gozal
>
> > -----Original Message-----
> > From: Caspar van Vroonhoven [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 04, 2000 8:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: Javascript + JSP + Including
> >
> >
> > Hey everyone,
> >
> >
> > I've got a little question about using Javascript and JSP together..:
> >
> > How can I include parameters (..<here he goes again :-)>..) in a window
> > constructed by window.open in javascript...
> > This particular parameter is requested at the page where the
> > javascript is,
> > so the real question is how to get a JSP string into a javascript one, so
> > that it can be put in my statement (if at all possible) like this:
> >
> > var cCW = window.open("/addinfo/currency.html?price=" + string +
> > ","currencyConverter","HEIGHT=400,WIDTH=400");
> >
> > where the string is supplied by jsp..
> > copying the whole <%= ..... %> thing doesn't work, I already tried that..
> >
> > TIA,
> >
> > Caspar van Vroonhoven
> > www.tradingcars.com
> > Amsterdam, The Netherlands
> >
> > ==================================================================
> > =========
> > 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
===========================================================================
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