W3C home > Mailing lists > Public > www-html@w3.org > June 2000

Re: event trigger and Netscape

From: Bart Van Damme <bartvd@dommel.com>
Date: Sat, 17 Jun 2000 08:59:25 -0400 (EDT)
Message-ID: <003101bfd85b$b75b49e0$0a00000a@homer.simpson>
To: "Lars" <Lars_Reith@bigfoot.de>, <www-html@w3.org>

I have no ready explanation for the first problem.  Knowing how sensitive Netscape is about the syntax used, it might help to take into account case-sensitivity :

"onMouseOver" instead of "onmouseover".

Again, I'm not sure about this and I don't have that version of NS to try it out.

Regarding the second problem, the variables used within a function should also be included in the function name :

function writeit(infos) instead of function writeit()

The "writeit" function might still not recognize the variable if the "init" function hasn't been executed first.  It is therefore advisable to declare infos outside the function.

Bart VD

- If you're a cowboy and you're dragging a guy behind your horse, I bet it would really make you mad if you looked back and the guy was reading a magazine. -

    -----Original Message-----
    From: Lars <Lars_Reith@bigfoot.de>
    To: www-html@w3.org <www-html@w3.org>
    Date: Saturday, June 17, 2000 12:56 PM
    Subject: event trigger and Netscape
    I'm designing a web page using JavaScript. When I use Netscape Communicator 4.7 to test the page, it seems that Netscape ignores the event triggers. For example:
    <img src="example.gif" width="100" height="30" border="0" alt="" onmouseover="dosomething()" onmouseout="dosomethingelse()">
    Netscape would show the picture, but nothing would happen if the mouse scrolls over or out of the picture. This might be caused by the browsers settings, I don't now.
    Another problems is, dealing more with JavaScript, that the onload event trigger seemed not to work probably. I wanted to give a variable a value by the moment the page
    is loaded:
    <script language="JavaScript">
    function init()
    {infos="Hello there"}    
    function writeit()
    <input type="button" value="clickme" name="button1" onclick="writeit()">
    By clicking the button, a text should appear on the screen reading "Hello there", however, the following error accurs: 'infos' is undefined
    Hopefully someone can help me
Received on Tuesday, 20 June 2000 13:29:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:54 UTC