$testvar = 'www.google.com';

print("<input type=button value = 'callsite'
onclick='popwindow(“.$testvar.”);'>");

 

 

You need to concatenate the variable into the popup function.

 

--Jimmy

 

---------------------------------

James Schappet

http://www.schappet.com

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dhivya Arasappan/O/VCU
Sent:
Monday, August 14, 2006 4:31 PM
To: perl-unix-users@listserv.ActiveState.com
Subject: [Perl-unix-users] Fw: cgi-perl: embedding _javascript_ in cgi-perl

 

Hi everyone,

 

I've been trying to put a button in my perl-cgi program which when clicked calls a _javascript_ function.

 

I need to send a previously initialized perl variable to the _javascript_ function as an argument. But, when I try to pass the parameter to the jsp function, the function is not called properly.

 

Here's a snippet of my code:

 

$testvar = 'www.google.com';

print("<input type=button value = 'callsite'
>");

 

The jsp function is as follows:


function popwindow(v){

        newwindow=window.open(url,'test','height=400,width=200');
        if(window.focus){newwindow.focus()}
}

 

So, how do I pass a perl variable into a jsp function?

 

Any help would be appreciated.

 

thanks

dhivya arasappan

 

_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to