SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    London
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question probs in netscape

    having problems getting this to work in Netscape... any pointers

    <script language="JavaScript1.2" type="text/JavaScript">
    page_id=3010;
    f_height=21;
    f_width=430;

    document.write('<div id="frame' + page_id + '"></div>');
    function errorHandler () {
    if (this.src.indexOf('banner-feed.test') != -1)
    this.src = 'http://banner-feed2.test.com/blank.gif?' + rnd
    }
    function loadHandler () {

    var f = eval('frame' + page_id);
    if (this.src.indexOf('banner-feed.test') != -1)
    {
    f.innerHTML='<iframe width=' + f_width + ' height=' + f_height + ' src="http://banner-feed.test.com/window/?page_id=' + page_id + '" marginheight=0 marginwidth=0 border=0 frameborder=0 scrolling=no name=ifmainnav></iframe>';
    f.innerHTML+='<layer width=' + f_width + ' height=' + f_height + ' src="http://banner-feed.test.com/window/?page_id=' + page_id + '"></layer>';
    }
    else
    {
    if (this.src.indexOf('banner-feed2.test') != -1)
    {
    f.innerHTML+='<iframe width=' + f_width + ' height=' + f_height + ' src="http://banner-feed2.test.com/window/?page_id=' + page_id + '" marginheight=0 marginwidth=0 border=0 frameborder=0 scrolling=no name=ifmainnav></iframe>';
    f.innerHTML+='<layer width=' + f_width + ' height=' + f_height + ' src="http://banner-feed2.test.com/window/?page_id=' + page_id + '"></layer>';
    }
    }
    }

    var rnd = (Math.random().toString()).substring(2); var img = new Image(); img.onload = loadHandler; img.onerror = errorHandler;
    img.src = 'http://banner-feed.test.com/blank.gif?' + rnd;
    </script>

  2. #2
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    yes, you need to add +"px" to your positions and sizes
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


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
  •