Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > "please wait..." in content frame during computation

Reply
Thread Tools

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

 
 
carson.clan.nc@gmail.com
Guest
Posts: n/a
 
      11-06-2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
How to get content from one frame into another frame Fokke Nauta HTML 3 04-29-2009 09:19 AM
Warning during generating classes through WSIMPORT & Error during xmlvalidation traveller Java 0 01-08-2008 07:00 AM
"please wait..." in content frame during computation tanager Javascript 4 11-08-2007 07:14 PM
Referring to a frame's content from another frame Microsoft ASP .Net 3 10-04-2004 06:35 AM



Advertisments