Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Web Toolkit progam, javascript and Netscape application error
I have a plsql web toolkit procedure. It contains javascript and html.
The procedure compiles fine and works great. It dispays inside a
netscape window and renders an html form populated with oracle
database data. It sets a timeout and requerys the database every
90 seconds redrawing the form populated with current data.
Heres the rub... Since I have a few different offices
that require the same functionality I have copied this procedure 4 times under
different names in the same package. I dont see a problem with this.
When I try to run two or more of these differently named procedures at
the same time each inside independently name Netscape windows, I get a
Netscape application error. Like I said, as long as I only
run one of the procedures it works fine. It must be some sort of memory
violation thing? I have not tried this in MS Explorer. I think I
will go do that now. Thanks for any help or thoughts/improvements.
Wild guesses to the possible problem:
procedure maint_db_monitor(ship_chk in varchar2, job_chk in varchar2, req_chk in varchar2)
is
begin
declare
cnt_ship number; cnt_job number; cnt_req number;
select count(lgm_id)
into cnt_job from lgm_jobs where lgm_accept_date is null and canceled_date is null and job_complete_date is null; select count(req_id) into cnt_req from rcm_info where canceled_date is null and lgm_accept_name_ops is null;
htp.p('
<HTML> <HEAD> <TITLE>Maintenance Database Monitor</TITLE> <script language="javascript1.3">
var timerid;
var is_ship_checked; var is_job_checked; var is_req_checked;
function set_values()
{
if (document.monitor.ship_chkbx.checked == true)
is_ship_checked = "checked";
else
is_ship_checked = "";
if (document.monitor.job_chkbx.checked == true)
is_job_checked = "checked";
else
is_job_checked = "";
if (document.monitor.req_chkbx.checked == true)
is_req_checked = "checked";
else
is_req_checked = "";
}
function turn_on()
{
document.monitor.onoff.value = "ON";
set_values();
top.window.location.href = "lmcaforms.maint_db_monitor?ship_chk="+is_ship_checked+"&job_chk="+is_job_checked+"&req_chk="+is_req_checked;
}
function set_timer()
{
timerid = setTimeout("turn_on()",90000);
}
function turn_off()
{
document.monitor.onoff.value = "OFF";
clearTimeout(timerid);
}
</script </HEAD> <BODY bgcolor="#BBBBB" onLoad="set_timer();">');
htp.p(
'<form name="monitor"> '||
'<font face="courier new" size="1"><b>On/Off</b> </font>'||
'<font face="courier new" size="1"><INPUT type="text" name="onoff" value="ON" size="4"></font><br>'||
'<font face="courier new" size="1">  <b>Ship</b> </font>'||
'<font face="courier new" size="1"><INPUT type="text" name="ship" value="'||cnt_ship||'" size="4"></font>'||
'<font face="courier new" size="1"><INPUT type="checkbox" name="ship_chkbx" onClick="set_values()" '||ship_chk||'></font>'||
'<img src="/web_html/pics/speaker.gif" align="top" height=18 width=18 border=0><br>'||
'<font face="courier new" size="1">   <b>Job</b> </font>'||
'<font face="courier new" size="1"><INPUT type="text" name="job" value="'||cnt_job ||'" size="4"></font>'||
'<font face="courier new" size="1"><INPUT type="checkbox" name="job_chkbx" onClick="set_values()" '||job_chk||'></font>'||
'<img src="/web_html/pics/speaker.gif" align="top" height=18 width=18 border=0><br>'||
'<font face="courier new" size="1">   <b>Req</b> </font>'||
'<font face="courier new" size="1"><INPUT type="text" name="req" value="'||cnt_req ||'" size="4"></font>'||
'<font face="courier new" size="1"><INPUT type="checkbox" name="req_chkbx" onClick="set_values()" '||req_chk||'></font>'||
'<img src="/web_html/pics/speaker.gif" align="top" height=18 width=18 border=0><br><br> '||
'<font face="times new roman" size="1"><center><INPUT type="button" name="On" value="On" onClick="turn_on();"></font>'||
'<font face="times new roman" size="1"> <INPUT type="button" name="Off" value="Off" onClick="turn_off();"></font></center>'||
'</form>');
if (cnt_ship > 0 and ship_chk = 'checked') or (cnt_job > 0 and job_chk = 'checked') or (cnt_req > 0 and req_chk = 'checked') then htp.p(' <EMBED name="uh_oh" src="/web_html/sounds/uh_oh.wav" loop="1" autostart="true" mastersound hidden="true" volume="10"></embed>
<script language="javascript">
window.focus();
</script>
');
end if;
htp.p('
</BODY>
</HTML>
');
end;
end;
Received on Tue Oct 19 1999 - 08:31:43 CDT