Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    Lingle, Wy
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OnClick stops gif?

    Ths following is a snippet of a larger code.
    Any way every time I click on the menu button it turns off all the animation of the gifs on the page.
    Whats up.
    Can't fiqure this one out.
    You can go to my website at:
    ProAm Rodeo
    Or cut an paste this snippet.
    Got me!

    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <META name="description" content="">
    <META name="keywords" content="">
    <META name="generator" content="CuteHTML">
    <script language="javascript1.3">
    <!--
    /*
    * Pre-load the specified image. This loads the image as the page
    * loads, so that when it is used later (such as for a mouseover effect),
    * the image has already been loaded.
    */
    function preloadImage(imageName) {
    var image = new Image();
    image.src = imageName;
    }

    // Preload images for rollover effects.
    preloadImage("http://www.proamrodeo.com/gif/menu/Menu-over.gif");
    preloadImage("http://www.proamrodeo.com/gif/menu/Menu-down.gif");
    preloadImage("http://www.proamrodeo.com/gif/menu/About_Us-over.gif");
    preloadImage("http://www.proamrodeo.com/gif/menu/About_Us-down.gif");

    (1)Something In here.
    //Onclick Menu Script
    /*/When Menu button clicked shuts off animation
    in top left images and under construction gif.*/

    function show(layerid)
    {
    if (document.getElementById) // IE and NS6
    {
    elm=document.getElementById(layerid)
    if(elm.style.visibility=="visible")
    {
    elm.style.visibility="hidden"
    }
    else
    {
    elm.style.visibility="visible"
    }
    }
    if(document.layers)
    {
    obj=eval("document."+layerid)
    if(obj.visibility=="show")
    {
    obj.visibility="hide"
    }
    else
    {
    obj.visibility="show"
    }
    }
    }
    //End Of Menu Script
    //-->
    </script>
    </HEAD>
    <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
    <!--Don't forget to add your FREE HitBOX statistics to your web page. To
    do so, click on Tools\Online Services\Add statistics...-->

    >(2)Is turning Off The Animation Here.
    <!-- Under construction image -->
    <DIV STYLE="position:absolute; top:125px; left:100px; width:200px; border-width:0; visibility: visible; z-index:3">
    <img src="http://www.proamrodeo.com/gif/med/underconstc.gif" width="200" height="43" alt="Best Viewed AT THE MOMENT With Internet Explorer!!! Coming: Netscape and Others."></img>
    </DIV>

    (3)When the onClick function here is used
    <!-- Menu Link- Main -->
    <DIV STYLE="position:absolute; top:260px; left:340px; width:90px; border-width:0; visibility: visible; z-index:1">
    <a href="javascript:void(0);" onfocus="this.blur();" onclick="show('mytexta');"
    onMouseOver="document.images['Menu'].src = 'http://www.proamrodeo.com/gif/menu/Menu-over.gif';
    window.status='Click For Full Menu.';return true;"
    onMouseOut="document.images['Menu'].src = 'http://www.proamrodeo.com/gif/menu/Menu.gif';
    window.status='';return true;"
    onMouseDown="document.images['Menu'].src = 'http://www.proamrodeo.com/gif/menu/Menu-down.gif';
    window.status='Click For Full Menu.';return true;"
    onMouseUp="document.images['Menu'].src = 'http://www.proamrodeo.com/gif/menu/Menu-over.gif'; window.status='Click For Full Menu.';return true;">
    <img name="Menu" src="http://www.proamrodeo.com/gif/menu/Menu.gif" width="88" height="38" border="0" alt="Click For Full Menu"></img></a><br>
    </DIV>

    <DIV id="mytexta" STYLE="position:absolute; top:230px; left:540px; width:90px; border-width:0; visibility:hidden; z-index:1">
    <a href="javascript:void(0);" onfocus="this.blur();"
    onMouseOver="document.images['About_Us'].src = 'http://www.proamrodeo.com/gif/menu/About_Us-over.gif';
    window.status='Meet Our Board Of Directors and Affiliate Members.';return true;"
    onMouseOut="document.images['About_Us'].src = 'http://www.proamrodeo.com/gif/menu/About_Us.gif';
    window.status='';return true;"
    onMouseDown="document.images['About_Us'].src = 'http://www.proamrodeo.com/gif/menu/About_Us-down.gif';
    window.status='Meet Our Board Of Directors and Affiliate Members.';return true;"
    onMouseUp="document.images['About_Us'].src = 'http://www.proamrodeo.com/gif/menu/About_Us-over.gif'; window.status='Meet Our Board Of Directors and Affiliate Members.';return true;">
    <img name="About_Us" src="http://www.proamrodeo.com/gif/menu/About_Us.gif" width="90" height="40" vspace="0" border="0" alt="About Us"></img></a><br>
    </div>
    </BODY>
    </HTML
    Thank You.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    cra...
    to the bestest of /mes just a knowledge® lol...once your just a dosomething® on the page??? thennn just a nimated® gifs stop doing their 'thing' since youve just a changed® the 'focus' to some other part in the page...
    n' the onlyyy way /me knows how to get just a round® it is by having your page in 'frames' n' having the just a nmiated® graphic in its own...sooo then no matter whats happening elsewhere on the 'monitor screen' it doenst just a ffect® the graphic from doing its 'thing'...


    just a ps®.../me noticed you just a forgot® the ol' closing > on the </html
    'cept thinking thattts just a typo® hehehe...

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's probably something very simple and thus also very subtle, try changing this onclick="show('mytexta');" to onclick="show('mytexta');return false;"


  •  

    Posting Permissions

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