www.webdeveloper.com
Results 1 to 6 of 6

Thread: There supposedly is a mistake in my javascript, but what is it?? Help anybody...?

  1. #1
    Join Date
    Nov 2013
    Posts
    2

    There supposedly is a mistake in my javascript, but what is it?? Help anybody...?

    Type of html:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    within header:

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


    body {
    scrollbar-arrow-color: deepskyblue;
    scrollbar-base-color: lightkyblue;
    scrollbar-dark-shadow-color: lightskyblue;
    scrollbar-track-color: lightskyblue;
    scrollbar-face-color: lightskyblue;
    scrollbar-shadow-color: deepskyblue;
    scrollbar-highlight-color: deepskyblue;
    scrollbar-3d-light-color: deepskyblue;
    }
    </style>

    <style type="text/css">
    <!--
    A:link {text-decoration: none}
    A:visited {text-decoration: none}
    A:active {text-decoration: none}
    A:hover {text-decoration: underline}
    -->
    </style>


    <style type="text/css">

    #dropmenudiv{
    position:absolute;
    border:1px solid black;
    border-bottom-width: 0;
    font:normal 12px Verdana;
    line-height:18px;
    z-index:100;
    }

    #dropmenudiv a{
    width: 200%;
    display: block;
    text-indent: 3px;
    border-bottom: 1px solid black;
    padding: 1px 0;
    text-decoration: none;
    font-weight: bold;
    }

    #dropmenudiv a:hover{ /*hover background color*/
    background-color: yellow;
    }

    </style>

    <script type="text/javascript">


    //Contents for menu 1
    var menu1=new Array()
    menu1[0]='<a
    href="http://www.angelfire.com/super2/greece/lesvoshotelsnl.html">ALLE
    HOTELS</a>'
    menu1[1]='<a
    href="http://www.angelfire.com/super2/greece/anessisstudios-lesbosnl.html">Anaxos
    Beach - Anessis Studios</a>'
    menu1[2]='<a
    href="http://www.angelfire.com/super2/greece/eftalounl.html">Eftalou -
    Alkaios Hotel</a>'
    menu1[3]='<a
    href="http://www.angelfire.com/super2/greece/olivegrove-lesbosnl.html">Golf
    van Gera - Olive Grove</a>'
    menu1[4]='<a
    href="http://www.angelfire.com/super2/greece/pension-lesbosnl.html">Molyvos
    - Schoolmistress Pension</a>'
    menu1[5]='<a
    href="http://www.angelfire.com/super2/greece/nassosnl.html">Molyvos - Nassos
    Guesthouse</a>'
    menu1[6]='<a
    href="http://www.angelfire.com/super2/greece/captainnl.html">Molyvos -
    Captains View</a>'
    menu1[7]='<a
    href="http://www.angelfire.com/super2/greece/kyparisisnl.html">Mystegna -
    Kyparisis Beach Houses</a>'
    menu1[8]='<a
    href="http://www.angelfire.com/super2/greece/ikies-lesbosnl.html">Neapoly -
    Ikies Small Elegant Houses</a>'
    menu1[9]='<a
    href="http://www.angelfire.com/super2/greece/petranl.html">Petra - Defkalion
    Hotel</a>'
    menu1[10]='<a
    href="http://www.angelfire.com/super2/greece/petranl.html">Petra - Toula
    Appartementen</a>'
    menu1[11]='<a
    href="http://www.angelfire.com/super2/greece/plomarinl.html">Plomari -
    Sellados Luxury Villas</a>'
    menu1[12]='<a
    href="http://www.angelfire.com/super2/greece/passionenl.html">Skala Eressos
    Beach - Villa La Skala</a>'
    menu1[13]='<a
    href="http://www.angelfire.com/super2/greece/imertihotelnl.html">Skala
    Kallonis - Imerti Resort Hotel</a>'
    menu1[14]='<a
    href="http://www.angelfire.com/super2/greece/votsalanl.html">Thermi - Lesvos
    Inn Resort Spa Hotel</a>'
    menu1[15]='<a
    href="http://www.angelfire.com/super2/greece/madonnanl.html">Vatera Beach -
    Madonna Studios</a>'
    menu1[16]='<a
    href="http://www.angelfire.com/super2/greece/aphroditehotel-lesbosnl.html">Vatera
    Beach - Aphrodite Beach Hotel</a>'

    var menuwidth='165px' //default menu width
    var menubgcolor='lightskyblue' //menu bgcolor
    var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
    var hidemenu_onclick="yes" //hide menu when user clicks within menu?

    /////No further editting needed

    var ie4=document.all
    var ns6=document.getElementById&&!document.all

    if (ie4||ns6)
    document.write('<div id="dropmenudiv"
    style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'"
    onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

    function getposOffset(what, offsettype){
    var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
    var parentEl=what.offsetParent;
    while (parentEl!=null){
    totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft :
    totaloffset+parentEl.offsetTop;
    parentEl=parentEl.offsetParent;
    }
    return totaloffset;
    }


    function showhide(obj, e, visible, hidden, menuwidth){
    if (ie4||ns6)
    dropmenuobj.style.left=dropmenuobj.style.top=-500
    if (menuwidth!=""){
    dropmenuobj.widthobj=dropmenuobj.style
    dropmenuobj.widthobj.width=menuwidth
    }
    if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
    obj.visibility=visible
    else if (e.type=="click")
    obj.visibility=hidden
    }

    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")?
    document.documentElement : document.body
    }

    function clearbrowseredge(obj, whichedge){
    var edgeoffset=0
    if (whichedge=="rightedge"){
    var windowedge=ie4 && !window.opera?
    iecompattest().scrollLeft+iecompattest().clientWidth-15 :
    window.pageXOffset+window.innerWidth-15
    dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
    if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
    edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
    }
    else{
    var topedge=ie4 && !window.opera? iecompattest().scrollTop :
    window.pageYOffset
    var windowedge=ie4 && !window.opera?
    iecompattest().scrollTop+iecompattest().clientHeight-15 :
    window.pageYOffset+window.innerHeight-18
    dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
    edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
    if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no g?od either?
    edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
    }
    }
    return edgeoffset
    }

    function populatemenu(what){
    if (ie4||ns6)
    dropmenuobj.innerHTML=what.join("")
    }


    function dropdownmenu(obj, e, menucontents, menuwidth){
    if (window.event) event.cancelBubble=true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidemenu()
    dropmenuobj=document.getElementById? document.getElementById("dropmenudiv")
    : dropmenudiv
    populatemenu(menucontents)

    if (ie4||ns6){
    showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
    dropmenuobj.x=getposOffset(obj, "left")
    dropmenuobj.y=getposOffset(obj, "top")
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj,
    "bottomedge")+obj.offsetHeight+"px"
    }

    return clickreturnvalue()
    }

    function clickreturnvalue(){
    if (ie4||ns6) return false
    else return true
    }

    function contains_ns6(a, b) {
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }

    function dynamichide(e){
    if (ie4&&!dropmenuobj.contains(e.toElement))
    delayhidemenu()
    else if (ns6&&e.currentTarget!= e.relatedTarget&&
    !contains_ns6(e.currentTarget, e.relatedTarget))
    delayhidemenu()
    }

    function hidemenu(e){
    if (typeof dropmenuobj!="undefined"){
    if (ie4||ns6)
    dropmenuobj.style.visibility="hidden"
    }
    }

    function delayhidemenu(){
    if (ie4||ns6)
    delayhide=setTimeout("hidemenu()",disappeardelay)
    }

    function clearhidemenu(){
    if (typeof delayhide!="undefined")
    clearTimeout(delayhide)
    }

    if (hidemenu_onclick=="yes")
    document.onclick=hidemenu

    </script>






    Within body:

    <BODY BGCOLOR="lightskyblue">
    <TABLE BORDER="0" BGCOLOR="lightskyblue" align="left">
    <TR>
    <TD BGCOLOR="Midnightblue" WIDTH="190" HEIGHT="25" align="left"><a
    href="http://www.angelfire.com/super2/greece/indexnl.html"><font
    color="white"><B>&nbsp;De Griekse Eilanden</b></font></a></TD>
    </TR>
    <TR>
    <TD BGCOLOR="Midnightblue" WIDTH="190" HEIGHT="25" align="left"><a
    href="http://www.angelfire.com/super2/greece/lesboshotelsnl.html"><font
    color="white"><B>&nbsp;Lesbos HOME</b></font></a></TD>
    </TR>
    <TR>
    <TD BGCOLOR="Midnightblue" WIDTH="190" HEIGHT="25" align="left"><a
    href="lesboshotels.html" onClick="return clickreturnvalue()"
    onMouseover="dropdownmenu(this, event, menu1, '150px')"
    onMouseout="delayhidemenu()"><font color="white"><B>&nbsp;Lesbos
    Hotels</b></font></a></TD>
    </TR>
    </table>



    <br><a href="http://validator.w3.org/check uri=referer"><img
    src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01
    Transitional" height="31" width="88"></a>
    </body>
    </HTML>

  2. #2
    Join Date
    Jun 2004
    Location
    Portsmouth UK
    Posts
    2,709
    string deginitions have line feeds causing the error

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    
    <style type="text/css">
    <!--
    body {
    scrollbar-arrow-color: deepskyblue;
    scrollbar-base-color: lightkyblue;
    scrollbar-dark-shadow-color: lightskyblue;
    scrollbar-track-color: lightskyblue;
    scrollbar-face-color: lightskyblue;
    scrollbar-shadow-color: deepskyblue;
    scrollbar-highlight-color: deepskyblue;
    scrollbar-3d-light-color: deepskyblue;
    }
    </style>
    
    <style type="text/css">
    <!--
    A:link {text-decoration: none}
    A:visited {text-decoration: none}
    A:active {text-decoration: none}
    A:hover {text-decoration: underline}
    -->
    </style>
    
    
    <style type="text/css">
    
    #dropmenudiv{
    position:absolute;
    border:1px solid black;
    border-bottom-width: 0;
    font:normal 12px Verdana;
    line-height:18px;
    z-index:100;
    }
    
    #dropmenudiv a{
    width: 200%;
    display: block;
    text-indent: 3px;
    border-bottom: 1px solid black;
    padding: 1px 0;
    text-decoration: none;
    font-weight: bold;
    }
    
    #dropmenudiv a:hover{ /*hover background color*/
    background-color: yellow;
    }
    
    </style>
    
    <script type="text/javascript">
    
    
    //Contents for menu 1
    var menu1=new Array()
    menu1[0]='<a href="http://www.angelfire.com/super2/greece/lesvoshotelsnl.html">ALLE HOTELS</a>'
    menu1[1]='<a href="http://www.angelfire.com/super2/greece/anessisstudios-lesbosnl.html">Anaxos Beach - <br>Anessis Studios</a>'
    menu1[2]='<a href="http://www.angelfire.com/super2/greece/eftalounl.html">Eftalou - Alkaios Hotel</a>'
    menu1[3]='<a href="http://www.angelfire.com/super2/greece/olivegrove-lesbosnl.html">Golf van Gera - Olive Grove</a>'
    menu1[4]='<a href="http://www.angelfire.com/super2/greece/pension-lesbosnl.html">Molyvos - Schoolmistress Pension</a>'
    menu1[5]='<a href="http://www.angelfire.com/super2/greece/nassosnl.html">Molyvos - Nassos Guesthouse</a>'
    menu1[6]='<a href="http://www.angelfire.com/super2/greece/captainnl.html">Molyvos - Captains View</a>'
    menu1[7]='<a href="http://www.angelfire.com/super2/greece/kyparisisnl.html">Mystegna - Kyparisis Beach Houses</a>'
    menu1[8]='<a href="http://www.angelfire.com/super2/greece/ikies-lesbosnl.html">Neapoly - Ikies Small Elegant Houses</a>'
    menu1[9]='<a href="http://www.angelfire.com/super2/greece/petranl.html">Petra - Defkalion Hotel</a>'
    menu1[10]='<a href="http://www.angelfire.com/super2/greece/petranl.html">Petra - Toula Appartementen</a>'
    menu1[11]='<a href="http://www.angelfire.com/super2/greece/plomarinl.html">Plomari -  Sellados Luxury Villas</a>'
    menu1[12]='<a href="http://www.angelfire.com/super2/greece/passionenl.html">Skala Eressos Beach - Villa La Skala</a>'
    menu1[13]='<a href="http://www.angelfire.com/super2/greece/imertihotelnl.html">Skala Kallonis - Imerti Resort Hotel</a>'
    menu1[14]='<a href="http://www.angelfire.com/super2/greece/votsalanl.html">Thermi - Lesvos Inn Resort Spa Hotel</a>'
    menu1[15]='<a href="http://www.angelfire.com/super2/greece/madonnanl.html">Vatera Beach - Madonna Studios</a>'
    menu1[16]='<a href="http://www.angelfire.com/super2/greece/aphroditehotel-lesbosnl.html">Vatera Beach - Aphrodite Beach Hotel</a>'
    
    var menuwidth='165px' //default menu width
    var menubgcolor='lightskyblue' //menu bgcolor
    var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
    var hidemenu_onclick="yes" //hide menu when user clicks within menu?
    
    /////No further editting needed
    
    var ie4=document.all
    var ns6=document.getElementById&&!document.all
    
    if (ie4||ns6)
    document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
    
    function getposOffset(what, offsettype){
    var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
    var parentEl=what.offsetParent;
    while (parentEl!=null){
    totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft :
    totaloffset+parentEl.offsetTop;
    parentEl=parentEl.offsetParent;
    }
    return totaloffset;
    }
    
    
    function showhide(obj, e, visible, hidden, menuwidth){
    if (ie4||ns6)
    dropmenuobj.style.left=dropmenuobj.style.top=-500
    if (menuwidth!=""){
    dropmenuobj.widthobj=dropmenuobj.style
    dropmenuobj.widthobj.width=menuwidth
    }
    if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
    obj.visibility=visible
    else if (e.type=="click")
    obj.visibility=hidden
    }
    
    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")?
    document.documentElement : document.body
    }
    
    function clearbrowseredge(obj, whichedge){
    var edgeoffset=0
    if (whichedge=="rightedge"){
    var windowedge=ie4 && !window.opera?
    iecompattest().scrollLeft+iecompattest().clientWidth-15 :
    window.pageXOffset+window.innerWidth-15
    dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
    if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
    edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
    }
    else{
    var topedge=ie4 && !window.opera? iecompattest().scrollTop :
    window.pageYOffset
    var windowedge=ie4 && !window.opera?
    iecompattest().scrollTop+iecompattest().clientHeight-15 :
    window.pageYOffset+window.innerHeight-18
    dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
    edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
    if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no g?od either?
    edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
    }
    }
    return edgeoffset
    }
    
    function populatemenu(what){
    if (ie4||ns6)
    dropmenuobj.innerHTML=what.join("")
    }
    
    
    function dropdownmenu(obj, e, menucontents, menuwidth){
    if (window.event) event.cancelBubble=true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidemenu()
    dropmenuobj=document.getElementById? document.getElementById("dropmenudiv")
    : dropmenudiv
    populatemenu(menucontents)
    
    if (ie4||ns6){
    showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
    dropmenuobj.x=getposOffset(obj, "left")
    dropmenuobj.y=getposOffset(obj, "top")
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj,
    "bottomedge")+obj.offsetHeight+"px"
    }
    
    return clickreturnvalue()
    }
    
    function clickreturnvalue(){
    if (ie4||ns6) return false
    else return true
    }
    
    function contains_ns6(a, b) {
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }
    
    function dynamichide(e){
    if (ie4&&!dropmenuobj.contains(e.toElement))
    delayhidemenu()
    else if (ns6&&e.currentTarget!= e.relatedTarget&&
    !contains_ns6(e.currentTarget, e.relatedTarget))
    delayhidemenu()
    }
    
    function hidemenu(e){
    if (typeof dropmenuobj!="undefined"){
    if (ie4||ns6)
    dropmenuobj.style.visibility="hidden"
    }
    }
    
    function delayhidemenu(){
    if (ie4||ns6)
    delayhide=setTimeout("hidemenu()",disappeardelay)
    }
    
    function clearhidemenu(){
    if (typeof delayhide!="undefined")
    clearTimeout(delayhide)
    }
    
    if (hidemenu_onclick=="yes")
    document.onclick=hidemenu
    
    </script>
    
    
    
    
    <BODY BGCOLOR="lightskyblue">
    <TABLE BORDER="0" BGCOLOR="lightskyblue" align="left">
    <TR>
    <TD BGCOLOR="Midnightblue" WIDTH="190" HEIGHT="25" align="left"><a
    href="http://www.angelfire.com/super2/greece/indexnl.html"><font
    color="white"><B>&nbsp;De Griekse Eilanden</b></font></a></TD>
    </TR>
    <TR>
    <TD BGCOLOR="Midnightblue" WIDTH="190" HEIGHT="25" align="left"><a
    href="http://www.angelfire.com/super2/greece/lesboshotelsnl.html"><font
    color="white"><B>&nbsp;Lesbos HOME</b></font></a></TD>
    </TR>
    <TR>
    <TD BGCOLOR="Midnightblue" WIDTH="190" HEIGHT="25" align="left"><a
    href="lesboshotels.html" onClick="return clickreturnvalue()"
    onMouseover="dropdownmenu(this, event, menu1, '150px')"
    onMouseout="delayhidemenu()"><font color="white"><B>&nbsp;Lesbos
    Hotels</b></font></a></TD>
    </TR>
    </table>
    
    
    
    <br><a href="http://validator.w3.org/check uri=referer"><img
    src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01
    Transitional" height="31" width="88"></a>
    </body>
    </HTML>
    <body>
    
    </body>
    
    </html>
    Vic

    God loves you and will never love you less.

    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. #3
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,716
    deleted
    Last edited by Padonak; 11-23-2013 at 10:26 AM.
    signature under construction

  4. #4
    Join Date
    Nov 2013
    Posts
    2

    ....

    Hello, thanks for your quick reply... I should have told you to tell them that the script works but the page where it is build in can not be validated at
    http://validator.w3.org

    that is our problem!

  5. #5
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,764
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  6. #6
    Join Date
    Jun 2004
    Location
    Portsmouth UK
    Posts
    2,709
    your markup needs to match the doc type
    to validate for the javascript errors you need( marked in red)

    Code:
    <script language="JavaScript" type="text/javascript">
    /*<![CDATA[*/
    
    
    
    //Contents for menu 1
    var menu1=new Array()
    menu1[0]='<a href="http://www.angelfire.com/super2/greece/lesvoshotelsnl.html">ALLE HOTELS</a>'
    menu1[1]='<a href="http://www.angelfire.com/super2/greece/anessisstudios-lesbosnl.html">Anaxos Beach - <br>Anessis Studios</a>'
    menu1[2]='<a href="http://www.angelfire.com/super2/greece/eftalounl.html">Eftalou - Alkaios Hotel</a>'
    menu1[3]='<a href="http://www.angelfire.com/super2/greece/olivegrove-lesbosnl.html">Golf van Gera - Olive Grove</a>'
    menu1[4]='<a href="http://www.angelfire.com/super2/greece/pension-lesbosnl.html">Molyvos - Schoolmistress Pension</a>'
    menu1[5]='<a href="http://www.angelfire.com/super2/greece/nassosnl.html">Molyvos - Nassos Guesthouse</a>'
    menu1[6]='<a href="http://www.angelfire.com/super2/greece/captainnl.html">Molyvos - Captains View</a>'
    menu1[7]='<a href="http://www.angelfire.com/super2/greece/kyparisisnl.html">Mystegna - Kyparisis Beach Houses</a>'
    menu1[8]='<a href="http://www.angelfire.com/super2/greece/ikies-lesbosnl.html">Neapoly - Ikies Small Elegant Houses</a>'
    menu1[9]='<a href="http://www.angelfire.com/super2/greece/petranl.html">Petra - Defkalion Hotel</a>'
    menu1[10]='<a href="http://www.angelfire.com/super2/greece/petranl.html">Petra - Toula Appartementen</a>'
    menu1[11]='<a href="http://www.angelfire.com/super2/greece/plomarinl.html">Plomari -  Sellados Luxury Villas</a>'
    menu1[12]='<a href="http://www.angelfire.com/super2/greece/passionenl.html">Skala Eressos Beach - Villa La Skala</a>'
    menu1[13]='<a href="http://www.angelfire.com/super2/greece/imertihotelnl.html">Skala Kallonis - Imerti Resort Hotel</a>'
    menu1[14]='<a href="http://www.angelfire.com/super2/greece/votsalanl.html">Thermi - Lesvos Inn Resort Spa Hotel</a>'
    menu1[15]='<a href="http://www.angelfire.com/super2/greece/madonnanl.html">Vatera Beach - Madonna Studios</a>'
    menu1[16]='<a href="http://www.angelfire.com/super2/greece/aphroditehotel-lesbosnl.html">Vatera Beach - Aphrodite Beach Hotel</a>'
    
    var menuwidth='165px' //default menu width
    var menubgcolor='lightskyblue' //menu bgcolor
    var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
    var hidemenu_onclick="yes" //hide menu when user clicks within menu?
    
    /////No further editting needed
    
    var ie4=document.all
    var ns6=document.getElementById&&!document.all
    
    if (ie4||ns6)
    document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
    
    function getposOffset(what, offsettype){
    var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
    var parentEl=what.offsetParent;
    while (parentEl!=null){
    totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft :
    totaloffset+parentEl.offsetTop;
    parentEl=parentEl.offsetParent;
    }
    return totaloffset;
    }
    
    
    function showhide(obj, e, visible, hidden, menuwidth){
    if (ie4||ns6)
    dropmenuobj.style.left=dropmenuobj.style.top=-500
    if (menuwidth!=""){
    dropmenuobj.widthobj=dropmenuobj.style
    dropmenuobj.widthobj.width=menuwidth
    }
    if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
    obj.visibility=visible
    else if (e.type=="click")
    obj.visibility=hidden
    }
    
    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")?
    document.documentElement : document.body
    }
    
    function clearbrowseredge(obj, whichedge){
    var edgeoffset=0
    if (whichedge=="rightedge"){
    var windowedge=ie4 && !window.opera?
    iecompattest().scrollLeft+iecompattest().clientWidth-15 :
    window.pageXOffset+window.innerWidth-15
    dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
    if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
    edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
    }
    else{
    var topedge=ie4 && !window.opera? iecompattest().scrollTop :
    window.pageYOffset
    var windowedge=ie4 && !window.opera?
    iecompattest().scrollTop+iecompattest().clientHeight-15 :
    window.pageYOffset+window.innerHeight-18
    dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
    edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
    if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no g?od either?
    edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
    }
    }
    return edgeoffset
    }
    
    function populatemenu(what){
    if (ie4||ns6)
    dropmenuobj.innerHTML=what.join("")
    }
    
    
    function dropdownmenu(obj, e, menucontents, menuwidth){
    if (window.event) event.cancelBubble=true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidemenu()
    dropmenuobj=document.getElementById? document.getElementById("dropmenudiv")
    : dropmenudiv
    populatemenu(menucontents)
    
    if (ie4||ns6){
    showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
    dropmenuobj.x=getposOffset(obj, "left")
    dropmenuobj.y=getposOffset(obj, "top")
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj,
    "bottomedge")+obj.offsetHeight+"px"
    }
    
    return clickreturnvalue()
    }
    
    function clickreturnvalue(){
    if (ie4||ns6) return false
    else return true
    }
    
    function contains_ns6(a, b) {
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }
    
    function dynamichide(e){
    if (ie4&&!dropmenuobj.contains(e.toElement))
    delayhidemenu()
    else if (ns6&&e.currentTarget!= e.relatedTarget&&
    !contains_ns6(e.currentTarget, e.relatedTarget))
    delayhidemenu()
    }
    
    function hidemenu(e){
    if (typeof dropmenuobj!="undefined"){
    if (ie4||ns6)
    dropmenuobj.style.visibility="hidden"
    }
    }
    
    function delayhidemenu(){
    if (ie4||ns6)
    delayhide=setTimeout("hidemenu()",disappeardelay)
    }
    
    function clearhidemenu(){
    if (typeof delayhide!="undefined")
    clearTimeout(delayhide)
    }
    
    if (hidemenu_onclick=="yes")
    document.onclick=hidemenu
    
    /*]]>*/
    </script>
    but you have many other errors on the page you will need to sort out yourself
    Vic

    God loves you and will never love you less.

    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

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

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.34381 seconds
  • Memory Usage 2,975KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (6)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (72):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates