SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    Non-Member JAMJAMMO's Avatar
    Join Date
    Dec 2000
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i need to combine two onMouseOver events and cnat figure it out. here they are
    Code:
    onMouseOver="imgover(pic1)"
    onMouseover="changetext(content[0])"
    ive tried combining them using a comma, colon and a semicolon and nothing works.

    please help?

  2. #2
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heres what your after.

    <script LANGUAGE="JavaScript">

    <!--

    // load up all the rollovers
    blankmsg = new Image();
    blankmsg.src = "images/blank_msg2.gif";

    Blah= new Image();
    blah0.src = "images/blahOff.gif";
    blah1 = new Image();
    blah.src = "images/BlahOn.gif";
    blahmsg = new Image();
    blahmsg.src = "images/BlahTxt.gif";


    loadedImages = 1;

    function doRollover (theButton, state) {
    if (document.images && loadedImages && ( document[theButton] )) {
    document[theButton].src = eval (theButton + state + ".src");
    (state) ?
    document['msgArea'].src = eval (theButton + "msg.src"):
    document['msgArea'].src = blankmsg.src;
    }
    }



    //-->
    </script>


    <a href="blah.htm" onMouseOver="doRollover('blah',1)" onMouseOut="doRollover('blaht',0)"><img name="blah" src="images/blahOn.gif" alt="blah" border="0"></a>

    This is where your text will appear:

    <img name="msgArea" src="images/blank_msg2.gif">


    Ok that should be it, hope this has helped you
    .NET Code Monkey

  3. #3
    Non-Member JAMJAMMO's Avatar
    Join Date
    Dec 2000
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you very much, i will give that a shot.

    i havent learned how to write my own scripts yet, so i use the ones provided by JAVASCRIPTSOURCE.COM and maytimes i end up combining more than one script to achieve a desired result.

    for Christmas i got 'JAVASCRIPT FOR THE WORLD WIDE WEB 3RD EDITION' by TOM NEGRINO / DORI SMITH, from Peachpit Press. so soon i will be doing my own cool stuff. i also got an XML also from Peachpit Press.

    again i thank you and i will use the method you mention above.


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
  •