|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I'm getting an error in a project I'm working on, I replicated the error in its simplest form with two files: 1) Test.cfm - a simple link to another page (Test2.cfm) with a javascript please wait function. 2) Test2.cfm - the result page - lets you know it has worked. The idea is a user selects an option, it displays a please wait message and then loads the page. The javascript works fine in Mozilla/Netscape, but in IE it hangs. The Javascript function does work in MSIE when submitting forms - but is there any way to get it to work for a hyperlink ?? Here is the code: <!--- End of Test.cfm ---> <!--- Test2.cfm ---> TEST2 Has Loaded!!! <!--- Test.cfm ---> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> function pleaseWait(){ document.write ('<BODY><font style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif; TEXT-ALIGN: left">Please Wait...</font></body>') } </SCRIPT> <a href="Test2.cfm" onClick="pleaseWait()">Test2 </a> <!--- End of Test2.cfm ---> |
|
#2
|
|||
|
|||
|
All sorted !
IE handles the event differently for some reason and needed it to remind it of the link! Heres the final code for Test.cfm: <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- function pleaseWait(theLink){ document.write ('<BODY><font style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY:Verdana, Geneva, Arial, Helvetica, sans-serif; TEXT-ALIGN: left">Please Wait...</font></body>'); if (navigator.appName == "Microsoft Internet Explorer"){ document.location = theLink.href; } } //--> </SCRIPT> <a href="Test2.cfm" onClick="pleaseWait(this)">Test2 </a> |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Javascript Message Stalling in IE - Help! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|