java script error please solve this problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • atheistashwin
    New Member
    • Apr 2010
    • 2

    java script error please solve this problem

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitl ed Document</title>

    <script
    language="JavaS cript"> // Expanding images script copyright Matthew
    LaCerais MLacerais@osc.s tate.ny.us // Distributed by hypergurl http://www.hypergurl.c om
    // Permission to use script granted if above credits are left intact <!-- function
    resizeImage(e) { if (document.layer s) { //Netscape var xMousePos = e.pageX; var
    xMousePosMax = window.innerWid th+window.pageX Offset; } else if (document.all)
    { // IE var xMousePos = window.event.x+ document.body.s crollLeft; } else if (document.getEl ementById)
    {//Netscape var xMousePos = e.pageX; var xMousePosMax = window.innerWid th+window.pageX Offset;
    } var i = (-1 * (((xMousePos/340) - (250/340)) * ((xMousePos/340) - (250/340))))
    + 1; if (i < .4) i = .4; if (i > 2) i = 2; picture1.width= (170 * i); picture1.height =(125
    * i); i = (-1 * (((xMousePos/340) - (420/340)) * ((xMousePos/340) - (420/340))))
    + 1; if (i < .4) i = .4; if (i > 2) i = 2; picture2.width= (170 * i); picture2.height =(125
    * i); i = (-1 * (((xMousePos/340) - (525/340)) * ((xMousePos/340) - (525/340))))
    + 1; if (i < .4) i = .4; if (i > 2) i = 2; picture3.width= (170 * i); picture3.height =(125
    * i); i = (-1 * (((xMousePos/340) - (600/340)) * ((xMousePos/340) - (600/340))))
    + 1; if (i < .4) i = .4; if (i > 2) i = 2; picture4.width= (170 * i); picture4.height =(125
    * i); i = (-1 * (((xMousePos/340) - (680/340)) * ((xMousePos/340) - (680/340))))
    + 1; if (i < .4) i = .4; if (i > 2) i = 2; picture5.width= (170 * i); picture5.height =(125
    * i); } function output(message) { obj = eval("text"); obj.innerHTML
    = "<font size=\"6\">"+me ssage+"</font>";
    } function handleMouse() { if (document.layer s) { // Netscape document.captur eEvents(Event.M OUSEMOVE);
    document.onmous emove = resizeImage; } else if (document.all) { // Internet Explorer
    document.onmous emove = resizeImage; } else if (document.getEl ementById) { // Netcsape
    6 document.onmous emove = resizeImage; } } function doNothing(e) { var i = 0.4;
    picture1.width= (170 * i); picture1.height =(125 * i); picture2.width= (170 * i);
    picture2.height =(125 * i); picture3.width= (170 * i); picture3.height =(125 * i);
    picture4.width= (170 * i); picture4.height =(125 * i); picture5.width= (170 * i);
    picture5.height =(125 * i); } function ignoreMouse() { if (document.layer s) { //
    Netscape document.captur eEvents(Event.M OUSEMOVE); document.onmous emove = doNothing;
    } else if (document.all) { // Internet Explorer document.onmous emove = doNothing;
    } else if (document.getEl ementById) { // Netcsape 6 document.onmous emove = doNothing;
    } } //--> </script>


    </head>

    <body>

    <table
    width="100%" border="0" cellspacing="0" cellpadding="0" >
    <tr> <td colspan="4" onMouseOver="ig noreMouse()"></td>
    </tr> <tr> <td width="8" height="140" valign="bottom"
    onMouseOver="ig noreMouse()"> </td> <td width="142"
    valign="bottom" onMouseOver="ha ndleMouse()"></td>
    <td width="889" valign="bottom" onMouseOver="ha ndleMouse()"><n obr>
    <a href="http://www.hypergurl.c om" target="_blank" ><img
    name="picture1" src="http://bytes.com/submit/live-art-4/images/image-b1.jpg" width="68" height="50"onMo useOver="output ('Palm
    Tree')" onMouseOut='out put("")' border="0"></a>
    <a href="http://www.hypergurl.c om/hosting.html" target="_blank" ><img
    name="picture2" src="http://bytes.com/submit/live-art-4/images/image-b2.jpg" width="68" height="50"
    onMouseOver="ou tput('Family')" onMouseOut='out put("")' border="0"></a>
    <a href="http://www.hypergurl.c om" target="_blank" ><img
    name="picture3" src="http://bytes.com/submit/live-art-4/images/image-b3.jpg" width="68" height="50"onMo useOver="output ('Family
    1')" onMouseOut='out put("")' border="0"></a>
    <a href="http://www.hypergurl.c om" target="_blank" ><img
    name="picture4" src="http://bytes.com/submit/live-art-4/images/image-b4.jpg" width="68" height="50"onMo useOver="output ('Menu
    Option 4')" onMouseOut='out put("")' border="0"></a>
    <a href="http://www.hypergurl.c om" target="_blank" ><img
    name="picture5" src="http://bytes.com/submit/live-art-4/images/image-b1.jpg" width="68" height="50"onMo useOver="output ('Menu
    Option 5')" onMouseOut='out put("")' border="0"></a>
    </nobr></td>
    <td width="3" valign="bottom"
    onMouseOver="ig noreMouse()">&n bsp;</td> </tr> <tr>
    <td height="10" colspan="4" onMouseOver="ig noreMouse()"></td>
    </tr> </table>
    <div
    id="text" name="text" style="position :absolute; left:166px;
    top:527px; width:665px; height:94px; z-index:1" onMouseOver="ig noreMouse()"></div>

    </body>
    </html>
    Attached Files
  • chathura86
    New Member
    • May 2007
    • 227

    #2
    Please use the code tags properly in your posts, and also
    it will be very helpful to post the error messages also

    it seems that you have used extra line breaks, remember in
    JS line breaks are considered as a end of statement. and also
    // comments are also only valid for a single line. please
    check and resubmit the code with the error message you get

    Regards
    Chathura Bamunusinghe

    Comment

    Working...