NETSCAPE fails to run Body onLoad, WHY ?!?!

Discussion in 'Javascript' started by BTHOMASinOHIO, Nov 15, 2004.

  1. In IE, this runs fine, but in Netscape, it doesn't error, but just
    doesn't run. WHY?!?!

    (in the Page Code Behind)
    BODY1.Attributes.Add("onLoad", "DisplayData();")

    (in the HTML of the Page)
    function DisplayData(){ = 'none'; = 'none'; = 'none'; = 'none';
    ....(yada yada yada)

    BTHOMASinOHIO, Nov 15, 2004
    1. Advertisements

  2. <URL:> may apply, but without being able
    to see an actual demonstration, it's impossible to say. Please see

    Michael Winter, Nov 15, 2004
    1. Advertisements

  3. So this is not JavaScript but some server-side ASP.NET code? You should
    state that clearly or better yet show us the HTML that Netscape receives
    as we usually don't care here what PHP or ASP or ASP.NET does on the
    server, it matters only what the browser sees.
    Have you checked Netscape's JavaScript console? I am sure there is an
    error displayed, unless somewhere the variables PanelDescription etc.
    are declared and initialized. If you have HTML elements with these ids e.g.
    <div id="PanelDescription">...</div>
    then you need to script e.g.
    document.getElementById('PanelDescription').style.display = 'none';
    in browsers following the W3C DOM (as Netscape/Mozilla do).
    If you also care about older browsers not throwing error messages then
    you also need to check whether document.getElementById and other
    features are supported.
    Martin Honnen, Nov 15, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.