Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can a cursor be changed consistently across frames?

Status
Not open for further replies.

Draug

Programmer
Apr 18, 2001
77
CA
Hi,

I have a multiframe page. Frame A contains of a form in which the user enters data. This data is submitted to the server using the POST method. The server does some querying on the database and displays the results in Frame B.

When the form is submitted, the cursor becomes an hour glass while over Frame A. But, if you move it to Frame B, the hourglass disappears.

Is there a way I can make the hourglass present on all frames while I wait for my server response? The response takes about 10 seconds.

It only has to work in IE5+.

Thanks in advance for your help.
Draug
 
Yes - just send a message to all frames, and reset the cursor property for the body. Then when done set it back again. Also provide loading message in status bar maybe.

e.g. call something tlike this from your frameset
//loop thru child frames setting their document.style.cursor property
function loading(){
for(var i=0;i<frames.length;i++){
frames.document.style.cursor = &quot;wait&quot;;
}
}


Then set it back to &quot;auto&quot; when done.:)
 
Thanks bangers,

That works great once I added the 'body' between 'document' and 'style'. :)

I am not sure when to turn the cursor back to auto. I tried the onLoad event of the frame that recieves the server results, but that only affects that frame, and the others are still showing the 'wait' cursor. The server results are posted to the frames using XSL, and I suspect that if I put the Javascript inside the XSL to restore the cursor to 'auto' that would work. But that, in my opinion, is not very elegant, and I would rather not do that. There has been alot of issues when I try to get JS and XSL to interact nicely. To have my cursor restored once the servlet sends the results, where should I call my JS function to restore the cursor to normal?

Also, the cursor shown in the frame that is about to recieve the results is a combination of an hour glass and the cursor. How do I set the rest of the frames to this same cursor?

Lastly, is there a way to set the cursor so that all of my links, buttons, drop downs, option bullets, etc, etc, stay as the hour glass (of course only while waiting for my response) when the mouse goes over them? If I could do this at the same time as the setting of the cursor for the frames, that would be ideal.


Thanks for your help. It has been very helpful so far.
Draug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top