"please wait..." in content frame during computation

C

carson.clan.nc

I have found lots of discussion of said subject, but nothing I try
will work. I'm hoping that starting this conversation with real
living people in 2007 will help.

I have two frames, left is toolbar, right is contents.
<frameset cols="35%,65%">
<frame src="../cgi-bin/cmpToolbar.py" name="toolbarFrame">
<frame src="cmpContents.html" name="contentsFrame">
</frameset>

The left frame is CGI, which takes an HTML template file and fills in
some pulldowns. The right frame is initially blank except for a
title. Pushing the submit button on the left frame calls CGI script
cmpRegressions.py, a slow computation/db access, so I want to repaint
the right side with "please wait..." while this is happening. I want
this to work after the right side has real contents too, obviously.

The most straightforward way seems to be using onsubmit or onclick.
Here is an excerpt of the template file which my left-side cgi fills
in.

<head>
<script type="text/javascript">
function waitMsg() {
top.contentsFrame.location = "../cmpreg/cmpWaiting.html";
document.forms["toolbar"].submit();
}
</script>
<base target="contentsFrame">
</head>
<body>
<FORM id="toolbar" name="toolbar" target=contentsFrame
METHOD="POST" ACTION="../cgi-bin/cmpRegressions.py" ENCTYPE="multipart/
form-data">
....
....
<input type="radio" name="inputType" value="buildset"
onclick="parent.contentsFrame.location='../cmpreg/cmpWaiting.html';">
....
....
<INPUT TYPE="submit" VALUE="compare" onclick="waitMsg(); return
false;">
</form>
</body>


Nothing I try will make the "submit" button change to the
cmpWaiting.html page when I click it. It does do the submit() via the
waitMsg() function, so the script is getting called AFAIK.

Notice, however, that I try the onclick technique on the "radio"
button in the middle of the form. It works fine! Of course, that
input is not running the cmpRegressions.py script, which is what the
submit button does.

I've tried putting the javascript code inline in the <input>, I've
tried onsubmit both in the <input> and in the <form>, I've tried too
many things to name. I'm pulling out my hair as I write this. What
am I missing?

Thanks,
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top