Connecting Tech Pros Worldwide Forums | Help | Site Map

how can i stop browser in IE7?

Newbie
 
Join Date: Aug 2008
Posts: 2
#1: Aug 27 '08
hi all,

code is working for IE6 and other browser but its not working in IE7.

document.execCommand('Stop') - IE6 code

window.stop() - Netscape code

can anyone help to stop browser code for IE7?

Thanks in advance

paul

Ferris's Avatar
Member
 
Join Date: Oct 2007
Location: Shanghai
Posts: 102
#2: Aug 27 '08

re: how can i stop browser in IE7?


what about
Expand|Select|Wrap|Line Numbers
  1. window.location.stop();
Newbie
 
Join Date: Aug 2008
Posts: 2
#3: Aug 29 '08

re: how can i stop browser in IE7?


Quote:

Originally Posted by Ferris

what about

Expand|Select|Wrap|Line Numbers
  1. window.location.stop();

window.location.stop(); also not working.
can u plz give me someother solution
Ferris's Avatar
Member
 
Join Date: Oct 2007
Location: Shanghai
Posts: 102
#4: Aug 30 '08

re: how can i stop browser in IE7?


Hi,I tested document.execCommand('Stop'); in IE7, it DOES work. Maybe some other errors occur before execCommand was executed.

my test code:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9. <a href="#" onClick="document.execCommand('Stop'); return false">Stop</a>
  10. <p>
  11. <iframe src="http://bytes.com/" width="800" height="400"></iframe>
  12. </p>
  13. </body>
  14. </html>
  15.  
  16.  
Expert
 
Join Date: Nov 2006
Posts: 392
#5: Sep 2 '08

re: how can i stop browser in IE7?


This could possibly be caused by the security settings in the IE7 instance you are testing with. The execCommand() function is heavily restricted and is something it is better to avoid. You might try lowing the security restrictions to see if that allows it to work.
Reply


Similar JavaScript / Ajax / DHTML bytes