Any one help me with the above weird error
I have a code like below
Expand|Select|Wrap|Line Numbers
- print <<"HTML";
- Content-type: text/html
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="expires" content="-1">
- <meta http-equiv="cache-control" content="no-cache">
- HTML
- print <<"END_OF_HTML1";
- <script language="JavaScript" src="get_job_var.js"></script>
- <script language="JavaScript" src="get_func.js"></script>
- <script language="JavaScript" src="js/emp.js"></script>
- </head>
- END_OF_HTML
- prn emp();
- print <<"END_OF_HTML2";
- <tr><td width="100%">
- <form name="empForm" method="POST" action="body.pl" target="s_body" onSubmit="return ValidateForm(this);">
- <table width="100%" border="1" style="font: 8pt Arial, Helvetica">
- <thead>
- <tr bgcolor="#CAD7EA" >
- <th align="center">EMP Criteria</th>
- </tr>
- </thead>
- <tbody id="tbody_30" style="display:" >
- END_OF_HTML
Now I want to get rid of prnemp() and use only [HTML]<body onLoad="initParam(empForm);"><script language="javascript">top.menufr.MSG = "$msg";</script>[/HTML]
to initialize the parameters. So, when I try to place the above 3 statements in between the END_OF_HTML1 and END_OF_HTML2, Its giving the msg like "Error: 'null' is null or not an object
Plzz help me :)
sub prnemp()
{
[html] <body onLoad="initParam(empForm);">
<script language="javascript">
top.menufr.MSG = "$msg" ;
</script>
<table width="100%">
<tr><td width="100%">
<table width="100%" border="1">
<thead>
<tr bgcolor="#CAD7EA" >
<th colspan=3 >
<table cellspacing=0 cols=2 width="100%" style="font: 8pt Arial, Helvetica">
<tr>
<th nowrap=1 align="left"><DIV onclick="ButtonClick('pc');"><img id="expimg" src="image/Collapse.gif"> Quick Count -- $emp</DIV></th>
<th nowrap=1 align="right">($empCode)</th>
</tr>
<tr>
<th nowrap=1 colspan=2 align="right">Last Update: $LastUpd</th>
</tr>
</table>
</th>
</tr>
</thead>
<tbody id="tbody_qc" style="display:none" >
<tr bgcolor="#F1F1F3">
<td NOWRAP=1>Summary</td>
<td align=center># of<br>Surveys</td>
<td align=center>% of<br>Surveys</td>
</tr>
<tr bgcolor="#F1F1F3">
<td NOWRAP=1>Scores</td>
<td align=center>$emp</td>
<td align=center>$prcnt</td>
</tr>[/HTML]
}