Fw: cgi-perl: embedding javascript in cgi-perl
by Dhivya Arasappan/O/VCU other posts by this author
Aug 14 2006 1:33PM messages near this date
view in the new Beta List Site
RE: cgi-perl: embedding javascript in cgi-perl
|
Re: Fw: cgi-perl: embedding javascript in cgi-perl
<FONT face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2> <DIV><FONT face="D
efault Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2> <DIV><P style="MARGIN: 0px">Hi
everyone, </P> <P style="MARGIN: 0px"> </P><P style="MARGIN: 0px">I've been trying to p
ut a button in my perl-cgi program which when clicked calls a javascript function. </P> <P st
yle="MARGIN: 0px"> </P><P style="MARGIN: 0px">I need to send a previously initialized
perl variable to the javascript function as an argument. But, when I try to pass the paramet
er to the jsp function, the function is not called properly. </P> <P style="MARGIN: 0px">&nbs
p; </P> <P style="MARGIN: 0px">Here's a snippet of my code: </P><P style="MARGIN: 0px">
</P> <P style="MARGIN: 0px">$testvar = 'www.google.com'; </P><P style="MARGIN: 0px">print("&
lt;input type=button value = 'callsite' <BR> onclick='popwindow($testvar);'>"); </P><P sty
le="MARGIN: 0px"> </P><P style="MARGIN: 0px">The jsp function is as follows: </P><P st
yle="MARGIN: 0px"> <BR>function popwindow(v){ </P><P style="MARGIN: 0px"> &n
bsp; newwindow=window.open(url,'test','height=400,width=200'); <BR> &
nbsp; if(window.focus){newwindow.focus()} <BR> } </P><P style="
MARGIN: 0px"> </P><P style="MARGIN: 0px">So, how do I pass a perl variable into a jsp
function? </P> <P style="MARGIN: 0px"> </P><P style="MARGIN: 0px">Any help would be app
reciated. </P> <P style="MARGIN: 0px"> </P><P style="MARGIN: 0px">thanks </P><P style="
MARGIN: 0px"> dhivya arasappan <BR></P><BR></DIV><BR></DIV></FONT></FONT>
Thread:
Dhivya Arasappan/O/VCU
Chris Wagner
|