SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2000
    Location
    Grand Rapids, MI
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Remote javascript hanging my pages?

    Hello,

    I'm not sure what this is called, I think it's remote script execution, but I could be wrong, so bear with me.

    I have a call that I make for an adserver:

    <script src="http://www...."></script>

    That populates the page at that point with some text. When it works, it works great, the text comes back, and everything is good. However, when the remote server does not return right away, or maybe the connection is down, my page hangs on it.

    So my question is, is there a way to structure the call on my end so that my page continues loading even if this call doesn't return?

    Thanks in advance,
    Mike
    My new position : Target for Middle Management Hostility.

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BIG shot in the dark...

    <script src="http://whatnot/" onerror="this.parentElement.removeChild(this)"></script>

    ???
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2000
    Location
    Grand Rapids, MI
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try that, but I'm not getting an error back from the remote script, just hanging (like a long delay, network congestion, something similar). I want it to be a "non-blocking" call... Is this even possible?
    My new position : Target for Middle Management Hostility.

  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe if I knew more details about what this remote script is acutally [I]doing[/B]...
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





Bookmarks

Posting Permissions

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