Hi all - I posted this on the Perl thread - to no avail.
I'm attempting to create a javascript with a cgi script for word definititions (a little tool tip with the definition comes up onMouseover) The thing is, for the javascript to work, teh code has to be on 1 line, but Perl is outputting 2 lines of HTML - and the script won't work. I'm not putting any \n anywhere.
Here is what the line should look like to work:
<A HREF="docs.html" onMouseOver="drs('The lady superior of a nunnery.'); return true;" onMouseOut="nd(); return true;">abbess</A>.
Here is what the Perl turns it into:
<A HREF="docs.html" onMouseOver="drs('The lady superior of a nunnery.
'); return true;" onMouseOut="nd(); return true;">abbess</A>.
And here is the relevant Perl scripting:
{
print "$msg)\ <A HREF=\"docs.html\" onMouseOver=\"drs(\'$definition\')\; return true\;\" onMouseOut=\"nd()\; return true\;\">$word</A>.\ \ \ \ \ ";
Below are teo links - the first to a sample page that works
and to one that doesn't
You'll see that the only difference is that the javascript is on 2 separate lines of code - any suggestions would be wonderful!!
Ethan
I'm attempting to create a javascript with a cgi script for word definititions (a little tool tip with the definition comes up onMouseover) The thing is, for the javascript to work, teh code has to be on 1 line, but Perl is outputting 2 lines of HTML - and the script won't work. I'm not putting any \n anywhere.
Here is what the line should look like to work:
<A HREF="docs.html" onMouseOver="drs('The lady superior of a nunnery.'); return true;" onMouseOut="nd(); return true;">abbess</A>.
Here is what the Perl turns it into:
<A HREF="docs.html" onMouseOver="drs('The lady superior of a nunnery.
'); return true;" onMouseOut="nd(); return true;">abbess</A>.
And here is the relevant Perl scripting:
{
print "$msg)\ <A HREF=\"docs.html\" onMouseOver=\"drs(\'$definition\')\; return true\;\" onMouseOut=\"nd()\; return true\;\">$word</A>.\ \ \ \ \ ";
Below are teo links - the first to a sample page that works
and to one that doesn't
You'll see that the only difference is that the javascript is on 2 separate lines of code - any suggestions would be wonderful!!
Ethan