HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 7th, 2004, 04:50 AM
RossC0 RossC0 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 15 RossC0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Javascript Message Stalling in IE - Help!

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 --->

Reply With Quote
  #2  
Old January 7th, 2004, 05:58 AM
RossC0 RossC0 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 15 RossC0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up Sorted it!

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>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Javascript Message Stalling in IE - Help!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT