Mozilla
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Mozilla

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 10th, 2007, 08:01 AM
Irfan Mohammed
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Catch the "Server not found" Event/Exception

Hi,
I have a simple xul app which loads a url and writes the contents to a
file. I use the "DMContentLoaded" event to trap the end of document
load as detailed below.

This works fine but when I give an invalid url like "http://icio.us",
i get a "server not found" popup which is the correct behaviour.

How do I trap this event/exception and handle it graciously in my
code?

function browserLoaded() {
// save the document to a file
}

var browser = document.getElementById("browserId");

browser.addEventListener("DMContentLoaded", browserLoaded, false);
browser.setAttribute('src', url);

Thanks,
Irfan


dev-tech-xul mailing list
dev-tech-xul (AT) lists (DOT) mozilla.org

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Mozilla > Catch the "Server not found" Event/Exception


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 Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | 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 1 hosted by Hostway