www.webdeveloper.com
Results 1 to 2 of 2

Thread: Please help me about this

  1. #1
    Join Date
    May 2012
    Posts
    1

    Exclamation Please help me about this

    Hello..I really need your help pleaseee anyone can help me??..

    This my coding..The problem is this function only can appear in IE but in other browser this function cannot appear..

    <body>


    <script type="text/javascript">

    function umieover(a)
    {
    a.document.getElementById("PopUp1").style.display = "block";
    }

    function umieout(a)
    {
    a.document.getElementById("PopUp1").style.display = "none";
    }

    function umieboxover(a)
    {
    a.document.getElementById("PopUp1").style.display = "block";
    }

    function umieboxout(a)
    {
    a.document.getElementById("PopUp1").style.display = "none";
    }

    function arcadiaover(b)
    {
    b.document.getElementById("PopUp2").style.display = "block";
    }

    function arcadiaout(b)
    {
    b.document.getElementById("PopUp2").style.display = "none";
    }

    function arcadiaboxover(b)
    {
    b.document.getElementById("PopUp2").style.display = "block";
    }

    function arcadiaboxout(b)
    {
    b.document.getElementById("PopUp2").style.display = "none";
    }

    function breadtimeover(c)
    {
    c.document.getElementById("PopUp3").style.display = "block";
    }

    function breadtimeout(c)
    {
    c.document.getElementById("PopUp3").style.display = "none";
    }

    function breadtimeboxover(c)
    {
    c.document.getElementById("PopUp3").style.display = "block";
    }

    function breadtimeboxout(c)
    {
    c.document.getElementById("PopUp3").style.display = "none";
    }

    </script>


    <div align="center">

    <!-- for display picture flor plan -->
    <img src="Tropicana new.png" width="800" height="500" border="0" usemap="#map" />

    <map name="map">

    <!-- START -->
    <!-- Coding for mouse over & out for umie-->
    <a name="umie" onmouseover="umieover(this)" onmouseout="umieout(this)" >

    <area shape="poly" coords="127,92,129,116,145,116,144,107,149,107,149,80,173,82,172,131,154,157,123,156,94,133,93,125,1 28,92,127,115,128,112" />

    <!-- for display popup for umie -->
    <a name="umiebox" onmouseover="umieboxover(this)" onmouseout="umieboxout(this)">
    <div id="PopUp1" style="display: none; position: absolute; left: 50px; top: 50px; border:solid black 1px; padding: 10px; background-color: #E2E2E2; font-size:12px; width: 299px;" >

    <!-- for message diaplay for umie-->
    <div id="PopUp1" align="center" ><h3>Umie</h3>
    <img border="1" src="images/umieNew.png" />
    <br /><br />
    Umie Slim, Umie Young, Apple Stem Cell, Anti-Wrinkle, Sabun Jongkong Emas = Stem Cell, Set pencerahan 3 in 1, 24k Pure Gold Collagen Serum.
    <br /><br />
    Our Website : <a onMouseOver="umieboxover(this)" href="http://www.gagoda.com/umie/" target="_blank" >Umie: Rahsia Kekal Remaja</a>
    <br /> <br />
    </div>
    </div></a>
    <!-- END -->


    <!-- START -->
    <!-- Coding for mouse over & out for Arcadia-->
    <a name="arcadia" onmouseover="arcadiaover(this)" onmouseout="arcadiaout(this)">
    <area shape="rect" coords="173,82,197,133" /></a>

    <!-- for display popup for arcadia -->
    <a name="arcadiabox" onmouseover="arcadiaboxover(this)" onmouseout="arcadiaboxout(this)">
    <div id="PopUp2" style="display: none; position: absolute; right: 540px; top: 50px; border:solid black 1px; padding: 10px; background-color: #E2E2E2; font-size:12px; width: 299px;">

    <!-- for message diaplay for arcadia-->
    <div id='PopUp2' align="center"><h3>Arcadia Agency</h3>
    <img border="1" src="images/ArcadiaAgencyNew.jpg" />
    <br /><br />
    Looking for a property? An apartment? Come visit us!
    <br /><br />
    Our Website : <a onMouseOver="arcadiaboxover(this)" href="http://www.gagoda.com/arcadiaagency/" target="_blank" >Arcadia Agency</a>
    <br /> <br />
    </div>
    </div></a>
    <!-- END -->


    <!-- START -->


    <!-- Coding for mouse over & out for Breadtime Bakery -->
    <a name="arcadia" onmouseover="breadtimeover(this)" onmouseout="breadtimeout(this)">
    <area shape="poly" coords="687,156,720,157,731,210,743,265,736,302,725,307,686,307,686,298,653,299,650,253,685,254,687, 229,702,229,702,181,686,180,686,156" /></a>

    <!-- for display popup for Breadtime Bakery -->
    <a name="arcadiabox" onmouseover="breadtimeboxover(this)" onmouseout="breadtimeboxout(this)">
    <div id="PopUp3" style="display: none; position: absolute; right: 5px; top: 200px; border:solid black 1px; padding: 10px; background-color: #E2E2E2; font-size:12px; width: 299px;">

    <!-- for message diaplay for Breadtime Bakery -->


    <div id="PopUp3" align="center"><h3>Arcadia Agency</h3>
    <img border="1" src="images/breadtimeBakeryNew.png"/>
    <br /><br />
    We provide a wide variety of cakes, breads, muffins, cup cakes, pizza, doughnut, and many, more of pastries products. Come visit us to try the best quality of bakery product in Malaysia!
    <br /><br />
    Our Website : <a onMouseOver="breadtimeboxover(this)" href="http://www.gagoda.com/breadtimestore/" target="_blank" >Breadtime Bakery</a>
    <br /> <br />
    </div>
    </div></a>
    <!-- END -->

    </map></div>
    </body>

  2. #2
    Join Date
    Mar 2007
    Location
    U.K.
    Posts
    1,127
    Code:
    function umieover(a)
    {
    a.document.getElementById("PopUp1").style.display = "block";
    }
    When you call one of these functions, you are passing a reference to the clicked link via this, so you are saying linkReference.document which doesn't exist. I.E. allows it but strictly it's incorrect and will cause errors elsewhere.

    If I had written this code, I would have used just one function to handle the individual hiding and re-display of all the different elements. It's not difficult, see if you can do it.
    Where used, return should be executed unconditionally and always as the last statement in the function.

    That's my signature, it's not part of the damn post!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles