Connecting Tech Pros Worldwide Help | Site Map

how can i stop browser in IE7?

  #1  
Old August 27th, 2008, 05:38 AM
Newbie
 
Join Date: Aug 2008
Posts: 2
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
  #2  
Old August 27th, 2008, 05:56 AM
Ferris's Avatar
Member
 
Join Date: Oct 2007
Location: Shanghai
Posts: 102

re: how can i stop browser in IE7?


what about
Expand|Select|Wrap|Line Numbers
  1. window.location.stop();
  #3  
Old August 29th, 2008, 06:55 AM
Newbie
 
Join Date: Aug 2008
Posts: 2

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
  #4  
Old August 30th, 2008, 01:14 PM
Ferris's Avatar
Member
 
Join Date: Oct 2007
Location: Shanghai
Posts: 102

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.  
  #5  
Old September 2nd, 2008, 05:16 PM
Expert
 
Join Date: Nov 2006
Posts: 392

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 Threads
Thread Thread Starter Forum Replies Last Post
fixing my css layout in ie7 cdea answers 1 August 16th, 2008 12:15 AM
Window.close on IE7 & FF2 - beyond .opener= and .open Toccoa answers 7 February 9th, 2007 08:25 PM
createTextNode and IE7 Randy Webb answers 50 December 19th, 2006 03:05 AM
Features in IE7 Philipp Lenssen answers 45 July 20th, 2005 08:16 PM