Ok here is the subroutine code sub open_html{ open(HTML,"<$rootdir/$FORM{'username'}.html"); @html = <HTML>; close(HTML);
print <<EndHTML; <html> <head> <title>Welcome $FORM{'username'} to the HTML Editor</title> <!-- <script language="Javascript1.2"><!-- // load htmlarea _editor_url = "http://www.cpty.net/earth/htmlarea/"; // URL to htmlarea files var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]); if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; } if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } // --></script> --> </head> <body bgcolor="$bg_colour" vlink="$hyperlinks_colour" alink="$hyperlinks_colour" link="$hyperlinks_colour" background="$url_to_background"> <div align="center"> <center> <table border="0" cellspacing="1" width="755" height="1" cellpadding="4"> <tr> <td width="755" height="-1"> <p align="center">$logo_url $banner_url </td> </tr> <tr> <td width="755" height="12"> <b> <font size="5" color="$title_colour">Welcome </font> <font size="5" color="$entry_colour">$FORM{'username'}</font> <font size="5" color="$title_colour"> to the HTML Editor</font> </b> <hr color="$linebreakcolour"> </td> </tr> <tr> <td width="755" height="19" valign="top"> </center> <form method="POST" action="edit.cgi"> <input type="hidden" name="username" value="$FORM{'username'}"> <input type="hidden" name="password" value="$FORM{'password'}"> <p align="left"><b><font face="Verdana" size="2" color="$field_text_colour">Welcome </font><font face="Verdana" size="2" color="$entry_colour">$FORM {'username'}</font><font face="Verdana" size="2" color="$field_text_colour"> to the HTML Editor</font></b> <br align="left"><b><font face="Verdana" size="2" color="$field_text_colour"> You can edit your homepage below:</font></b> <center> </p> <!-- cols="128" rows="17"> --> <p align="center"><textarea name="homepage_edit" style="font- size: 8pt; font-family: Arial; font-weight: bold; width:800; height:150">@html</textarea></p> <!-- <script language="javascript1.2"> editor_generate('homepage_edit'); </script> --> <p align="center"><input type="submit" value="Edit Homepage" name="edit_homepage" style="font-size: 10pt; font-family: Verdana; color: #000000; font-weight: bold"> <input type="reset" value="Reset" name="B2" style="font-size: 10pt; font-family: Verdana; color: #000000; font-weight: bold"></p> </form> <hr color="$linebreakcolour"> </center> </td> </tr> <tr> <td> </td> </tr> </table> </div> </body> </html> EndHTML } On Thu, 27 Feb 2003 13:14:36 -0000, Art MacArt wrote > let's see a code sample, then it might be easier to help.. > > ----- Original Message ----- > From: "Tom McKellips" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, February 27, 2003 3:00 AM > Subject: How do embed javascript > > > Hi, > > > > How do I embed a java script inside a perl cgi? In my perl code I have a > > print <<endofhtml line then I insert all the html as normal. > > Inside of the html i have a <script ..... /script> but none of it ever > > executes. I call it with a web browswer and view the source and it looks > > correct. Also I know that the javascript itself works fine. I have placed > it > > in a html page of it's own and it has run with no problems. Any ideas on > how > > I can fix this? > > > > Thanks > > Tom > > > > -- > > Internet Service Provided By Abyss Communications > > A leader in Dial up and Satellite Internet Access > > 1-866-842-2977 > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Internet Service Provided By Abyss Communications A leader in Dial up and Satellite Internet Access 1-866-842-2977 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]