Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 29th, 2003, 11:53 AM
Authorized User
 
Join Date: Aug 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default errors on outside pages

Hi all

  I have some frames . inside each frame I show a web page from outside my domain like 'www.msn.com' . my question how can I stop a javascript error if it happened in the page from outside my domain . the code is not under my control and on the sametime the error messages make the site cluttered with javascript errors messages . do you have any idea how can I prevent the javascript errors generated on pages on other domains to be displayed on my site ?

thanks

 
Old August 30th, 2003, 09:00 PM
Authorized User
 
Join Date: Jun 2003
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't know of a way to do that. It's a browser option that the user controls, not the web page.

For instance, in IE it's "Disable script debugging", and if the user checks that option, they will no longer see popups about javascript errors.

But I don't think you can disable it from your end.



-Van
(Old dog learning new tricks...)
 
Old September 1st, 2003, 04:23 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You can try to set the window.onerror method but I've found this to be unreliable due to cross-domain security measures.
Assuming your iframe is named "fraData"
Code:
window.frames["fraData"].onerror = function (){return true;};
--

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
CH 14 Pages 749-753 Compile Errors Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 1 March 28th, 2008 10:20 AM
strange "errors" with nested master pages... thenoseknows ASP.NET 2.0 Professional 2 November 28th, 2006 05:28 PM
Ch 5 - Errors in all *Rss.aspx pages ewelling BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 September 6th, 2006 09:16 AM
Can't get errors to display with <html:errors> michaeldill JSP Basics 0 August 2nd, 2004 01:47 PM
Errors in Code; Chapter 14, pages 566-567 ou812 BOOK: Beginning ASP 3.0 10 June 20th, 2004 09:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.