|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
How I can execute Javascript into Perl?
"I don't know how I can execute an event of Javascript into a link in a program in Perl.
This event of JavaScript have executed a function that return a HTML page. Anybody know how I can it? Is it possible do it this?: $datos=$datos.""<a href='"" . $me . ""?C=OFERTAS2&EMPRESA="".$empresa_param.""&NREF="" .$nref.""' onMouseOver=""linkFTecnica(nref2)"">""; What is bad in this code? Thank you very much. " |
|
#2
|
||||
|
||||
|
Re: How I can execute Javascript into Perl?
Are you trying to get the Javascript to execute inside of perl program or just trying to have the perl program output javascript? I'm a tad confused.
![]() |
|
#3
|
||||
|
||||
|
Re: How I can execute Javascript into Perl?
Quote:
If it is a perl function, then you need Code:
onMouseOver=" . linkFTecnica(nref2) . ">"; Hope this helped. |
|
#4
|
||||
|
||||
|
Re: How I can execute Javascript into Perl?
Do you get an error that looks something like this?
Code:
Bareword found where operator expected at test.pl line 1, near "'"" . $me . ""?C=OFERTAS2&EMPRESA="".$empresa_param.""&NREF="".$nref.""' onMouseOver"
(Missing operator before onMouseOver?)
Bareword found where operator expected at test.pl line 1, near """linkFTecnica"
(Missing operator before linkFTecnica?)
String found where operator expected at test.pl line 1, near ")"""
(Missing operator before ""?)
syntax error at test.pl line 1, near "'"" . $me . ""?C=OFERTAS2&EMPRESA="".$empresa_param.""&NREF="".$nref.""' onMouseOver"
Code:
# assuming linkFTecnica is a perl function $datos = $datos . "<a href='" . $me . "?C=OFERTAS2&EMPRESA=" . $empresa_param . "&NREF=" . $nref . "'onMouseOver=" . linkFTecnica(nref2) . ">"; -- or -- # assuming linkFTecnica is a perl function $datos = $datos . "<a href='$me?C=OFERTAS2&EMPRESA=$empresa_param&NREF=$nref' onMouseOver=" . linkFTecnica(nref2) . ">"; -- or -- # Assuming that linkFTecnica is a JS function (which it probably is) $datos = $datos . "<a href='$me?C=OFERTAS2&EMPRESA=$empresa_param&NREF=$nref' onMouseOver=linkFTecnica(nref2)>"; Also, remember that when you put a scalar variable within double quotes that it gets expanded. Code:
$x = "test"; $y = "This is a $x"; Code:
$x = "test"; $y = "This_is_a_$x_with_underscores" Code:
$x = "test";
$y = "This_is_a_" . $test . "_with_underscores";
$y = "This_is_a_${x}_with_underscores";
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How much planning goes into your robot? | Jnadke | General Forum | 41 | 29-01-2006 21:29 |
| Javascript and .ocx | lantian329 | Programming | 2 | 12-12-2005 23:59 |
| javascript ate my cereal! | steveg | IT / Communications | 2 | 29-03-2004 01:10 |
| Javascript onclick link concatination | Trashed20 | Website Design/Showcase | 10 | 04-06-2003 11:18 |
| How much time do you put into building your robot | Wayne Doenges | General Forum | 16 | 29-01-2002 19:30 |