ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-admin
perl-win32-admin
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">&nbsp; </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"> &nbsp; </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">&nbsp;
 </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);'&gt;"); </P><P sty
le="MARGIN: 0px"> &nbsp; </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">&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp; newwindow=window.open(url,'test','height=400,width=200'); <BR> &nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(window.focus){newwindow.focus()} <BR> } </P><P style="
MARGIN: 0px"> &nbsp; </P><P style="MARGIN: 0px">So, how do I pass a perl variable into a jsp 
function? </P> <P style="MARGIN: 0px">&nbsp; </P><P style="MARGIN: 0px">Any help would be app
reciated. </P> <P style="MARGIN: 0px">&nbsp; </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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved