Results 1 to 3 of 3

Thread: <object> error handling

  1. #1
    Join Date
    Dec 2010

    <object> error handling

    I m loading PDF inside <object> tag by setting data=content.aspx where content.aspx returns byte stream for my PDF. Everything works fine in success, but if there is any error inside content page, I m nt able to handle or catch it in my JavaScript.

    Pls suggest how to catch/handle error in js for error? This is critical for me, I request help from community.

    Thnks in advnce

  2. #2
    Join Date
    Apr 2011
    I live in the pinaple under the sea
    HTML Code:
    try {
      // your code that can throw exception goes here
    } catch(e) {
      //do stuff with the exception
    } finally {
      //regardless if it worked or not, do stuff here (cleanup?)

  3. #3
    Join Date
    Dec 2010
    thanks for replying.

    try/catch is not helpful because there is no error recvd by javascript. <object> tag always expects byte stream to be returned whetehr there is error or not. i tried to attach onerror event but that also doesnt get fired/caught.

    any suggestions?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center