Connecting Tech Pros Worldwide Help | Site Map

how can i stop browser in IE7?

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 27th, 2008, 04:38 AM
Newbie
 
Join Date: Aug 2008
Posts: 2
Default how can i stop browser in IE7?

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
Reply
  #2  
Old August 27th, 2008, 04:56 AM
Ferris's Avatar
Member
 
Join Date: Oct 2007
Location: Shanghai
Age: 23
Posts: 102
Default

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

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

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

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
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.