Gossamer Forum
Home : Products : DBMan : Customization :

inserting javascript into html.pl

Quote Reply
inserting javascript into html.pl
I am using the user-friendly html.pl and when I cut and paste some Javascript code into the html_page_top subroutine of the html.pl file, the javascript doesn't work in the browser. Should I be using the escape symbol ("\") for certain characters in the javascript portion of html.pl?
Quote Reply
Re: inserting javascript into html.pl In reply to
You need to put Javascript codes between the <head></head> anchors.

If that doesn't work, please post the Javascript codes you are attempting to use and we can assist you with the proper placement of the codes.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: inserting javascript into html.pl In reply to
thanks for replying Eliot... I think I figured out the problem: my image rollover Javascript code (generated by Dreamweaver) uses the "\" symbol. As far as I can tell, Perl interprets this as an escape symbol and so it disappears from the HTML that is outputted to the browser. To fix the problem, I put another "\" before every "\" in the Javascript. Now, the Javascript works as it should because Perl only looks at the first "\" and leaves the second.
Quote Reply
Re: inserting javascript into html.pl In reply to
Great. You are correct, the backslash character \ is interpreted as an escape character.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us