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 to the CF scene
    Join Date
    Feb 2004
    Location
    CA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Can someone tell me what I did wrong!?

    I am working on site for a friend and I put in a pop up menu then is suppose to pop up when yoou put your mouse over the word/pic but when I did it it said there was an error in the script, I double chacked and didn't see no errors. So maybe one of you all can tell me. Here is the coding.


    Code:
    <html>
    <head>
    <title>Welcome To This Website!</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style>
    <!--
    
    .menuskin{
    position:absolute;
    width:165px;
    background-color:menu;
    border:2px solid black;
    font:normal 12px Verdana;
    line-height:18px;
    z-index:100;
    visibility:hidden;
    }
    
    .menuskin a{
    text-decoration:none;
    color:black;
    padding-left:10px;
    padding-right:10px;
    }
    
    #mouseoverstyle{
    background-color:highlight;
    }
    
    #mouseoverstyle a{
    color:white;
    }
    -->
    </style>
    
    <script language="JavaScript1.2">
    
    
    linkset[1]='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/content.html" Target="main">Home</a></div>'
    linkset[1]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/join.html" Target="main">Join</a></div>'
    linkset[1]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/staff.html" Target="main">Staff</a></div>'
    linkset[1]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/rules.html" Target="main">Rules</a></div>'
    linkset[1]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/faq.html" Target="main">F.A.Q</a></div>'
    
    linkset[2]='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/mens.html" Target="main">Males</a></div>'
    linkset[2]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/female.html" Target="main">Divas</a></div>'
    linkset[2]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/stables.html" Target="main">Tag Teams/Stables</a></div>'
    linkset[2]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/champs.html" Target="main">Champions</a></div>'
    linkset[2]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/ranks.html" Target="main">Rankings</a></div>'
    linkset[2]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/hof.html" Target="main">Hall Of Fame</a></div>'
    linkset[2]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/cutlist.html" Target="main">Cut List</a></div>'
    
    linkset[3]='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/adrenalinecard.html" Target="main">Adrenaline Card</a></div>'
    linkset[3]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/adrenalineresults1.html" Target="main">Adrenaline Results</a></div>'
    linkset[3]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/disastercard.html" Target="main">Disaster Card</a></div>'
    linkset[3]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/disasterresults.html" Target="main">Disaster Results</a></div>'
    linkset[3]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/ppvcard.html" Target="main">Pay-Per-View Card</a></div>'
    linkset[3]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/ppvresults.html" Target="main">Pay-Per-View Results</a></div>'
    
    linkset[4]='<div class="menuitems"><a href="http://b4.boards2go.com/boards/board.cgi?user=wwcf4us">Adrenaline/PPV Board</a></div>'
    linkset[4]+='<div class="menuitems"><a href="http://b4.boards2go.com/boards/board.cgi?user=disasterboard">Disaster Board</a></div>'
    linkset[4]+='<div class="menuitems"><a href="http://b4.boards2go.com/boards/board.cgi?user=divaboard">Diva's Board</a></div>'
    linkset[4]+='<div class="menuitems"><a href="http://b2g5.com/boards/board.cgi?user=WwcFOOC">OOC Board</a></div>'
    
    linkset[5]='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/confirm.html" Target="main">Confirmation</a></div>'
    linkset[5]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/tnb.html" Target="main">Thuggin'N'Buggin</a></div>'
    linkset[5]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/monthlyawards.html" Target="main">Monthly Awards</a></div>'
    
    linkset[6]='<div class="menuitems"><a href="http://www.wwatna.cjb.net">WWA</a></div>'
    
    
    ////No need to edit beyond here
    
    var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
    var ns6=document.getElementById&&!document.all
    var ns4=document.layers
    
    function showmenu(e,which){
    
    if (!document.all&&!document.getElementById&&!document.layers)
    return
    
    clearhidemenu()
    
    menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
    menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj
    
    if (ie4||ns6)
    menuobj.innerHTML=which
    else{
    menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
    menuobj.document.close()
    }
    
    menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
    menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
    eventX=ie4? event.clientX : ns6? e.clientX : e.x
    eventY=ie4? event.clientY : ns6? e.clientY : e.y
    
    //Find out how close the mouse is to the corner of the window
    var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
    var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY
    
    //if the horizontal distance isn't enough to accomodate the width of the context menu
    if (rightedge<menuobj.contentwidth)
    //move the horizontal position of the menu to the left by it's width
    menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
    else
    //position the horizontal position of the menu where the mouse was clicked
    menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX
    
    //same concept with the vertical position
    if (bottomedge<menuobj.contentheight)
    menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight
    else
    menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY
    menuobj.thestyle.visibility="visible"
    return false
    }
    
    function contains_ns6(a, b) {
    //Determines if 1 element in contained in another- by Brainjar.com
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }
    
    function hidemenu(){
    if (window.menuobj)
    menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
    }
    
    function dynamichide(e){
    if (ie4&&!menuobj.contains(e.toElement))
    hidemenu()
    else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
    hidemenu()
    }
    
    function delayhidemenu(){
    if (ie4||ns6||ns4)
    delayhide=setTimeout("hidemenu()",500)
    }
    
    function clearhidemenu(){
    if (window.delayhide)
    clearTimeout(delayhide)
    }
    
    function highlightmenu(e,state){
    if (document.all)
    source_el=event.srcElement
    else if (document.getElementById)
    source_el=e.target
    if (source_el.className=="menuitems"){
    source_el.id=(state=="on")? "mouseoverstyle" : ""
    }
    else{
    while(source_el.id!="popmenu"){
    source_el=document.getElementById? source_el.parentNode : source_el.parentElement
    if (source_el.className=="menuitems"){
    source_el.id=(state=="on")? "mouseoverstyle" : ""
    }
    }
    }
    }
    
    if (ie4||ns6)
    document.onclick=hidemenu
    </script>
    <style type="text/css">
    <!--
    BODY {
    scrollbar-face-color: 000000;
    scrollbar-highlight-color: ff0000;
    scrollbar-3dlight-color: ff0000;
    scrollbar-darkshadow-color: ff0000;
    scrollbar-shadow-color: 000000;
    scrollbar-arrow-color: ff0000;
    scrollbar-track-color: 000000;
    }
    -->
    </style>
    <STYLE type=text/css>.large {FONT-SIZE: 11px; FONT-FAMILY: Verdana,Arial,Helvetica}
    .small {FONT-SIZE: 10px; FONT-FAMILY: Verdana,Arial,Helvetica}
    .bt5 {color:#000000;background-color:#ff0000;border : 1px solid #000000;font-weight:bold;font-size:11px}
    TD {FONT-SIZE: 11px; FONT-FAMILY: Verdana,Arial,Helvetica}
    A:link {COLOR: #ff0000;	TEXT-DECORATION: none}
    A:visited {COLOR: #ff0000; TEXT-DECORATION: none}
    A:hover {COLOR: #ff0000;	TEXT-DECORATION: underline}
    A.nav:link {COLOR: #ffffff; TEXT-DECORATION: none}
    A.nav:visited {COLOR: #ffffff; TEXT-DECORATION: none}
    A.nav:hover {COLOR: #ffffff; TEXT-DECORATION: underline}
    A.legal:link {COLOR: #000000; TEXT-DECORATION: none}
    A.legal:visited {COLOR: #000000; TEXT-DECORATION: none}
    A.legal:hover {COLOR: #000000; TEXT-DECORATION: underline}
    A.head:link {COLOR: #ffffff; TEXT-DECORATION: none}
    A.head:visited {COLOR: #ffffff; TEXT-DECORATION: none}
    A.head:hover {COLOR: #ffffff; TEXT-DECORATION: underline}
    A.head2:link {COLOR: #ff0000; TEXT-DECORATION: none}
    A.head2:visited {COLOR: #ffffff; TEXT-DECORATION: none}
    A.head2:hover {COLOR: #ffffff; TEXT-DECORATION: underline}
    </STYLE>
    </head>
    <body bgcolor="#000000" text="#ff0000" link="#ff0000" vlink="#ff0000" alink="#ff0000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'on');dynamichide(event)">
    </div>
    <table width="747" border="0" cellspacing="1" cellpadding="1" align="center">
      <tr> 
        <td colspan="2" width="739">
          <p align="center"><img height="95" src="http://www.angelfire.com/wrestling3/thewwcfefed/banner.jpg" width="601" align="center" border="0"></p>
          <hr size="3" color="#FF0000">
        </td>
      </tr>
      <tr> 
        <td width="195" valign="top"> 
          <table width="138" border="0" cellspacing="1" cellpadding="1" height="34">
            <tr> 
              <td height="30" width="6"></td>
              <td bgcolor="#ff0000" height="30" width="153"> 
                <table border="0" bordercolor="#ff0000" align="center" cellpadding="1" cellspacing="0" width="129" height="2">
                  <tr bordercolor="black" align="top"> 
                    <td bgcolor="#ff0000" width="125" height="14"> 
                      <p align="center"><font color="#000000"><b>NAVIGATION</b></font>
                    </td>
                  </tr>
                  <tr bgcolor="#000000" bordercolor="#999999"> 
                    <td onMouseOver="style.backgroundColor='#333333'" onMouseOut="style.backgroundColor='#000000'" width="125" bgcolor="#000000" height="18"> 
                      <p align="center"><a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Non-Members</a>
                      </p>
                    </td>
                  </tr>
                  <tr bgcolor="#000000" bordercolor="#999999"> 
                    <td onMouseOver="style.backgroundColor='#333333'" onMouseOut="style.backgroundColor='#000000'" bgcolor="#000000" height="18"> 
                      <p align="center"><a href="#" onMouseover="showmenu(event,linkset[2])" onMouseout="delayhidemenu()">Members</a>
                    </td>
                  </tr>
                  <tr bgcolor="#000000" bordercolor="#999999"> 
                    <td onMouseOver="style.backgroundColor='#333333'" onMouseOut="style.backgroundColor='#000000'" bgcolor="#000000" height="18"> 
                      <p align="center"> 
                      <a href="#" onMouseover="showmenu(event,linkset[3])" onMouseout="delayhidemenu()">Shows</a>
                      </p>
                    </td>
                  </tr>
                  <tr bgcolor="#000000" bordercolor="#999999"> 
                    <td onMouseOver="style.backgroundColor='#333333'" onMouseOut="style.backgroundColor='#000000'" width="125" bgcolor="#000000" height="18"> 
                      <p align="center"><a href="#" onMouseover="showmenu(event,linkset[4])" onMouseout="delayhidemenu()">Boards</a>
                    </td>
                  </tr>
                  <tr bgcolor="#000000" bordercolor="#999999"> 
                    <td onMouseOver="style.backgroundColor='#333333'" onMouseOut="style.backgroundColor='#000000'" width="125" bgcolor="#000000" height="18"> 
                      <p align="center"> 
                      <a href="#" onMouseover="showmenu(event,linkset[5])" onMouseout="delayhidemenu()">Other</a>
                      </p>
                    </td>
                  </tr>
                  <tr bgcolor="#000000" bordercolor="#999999"> 
                    <td onMouseOver="style.backgroundColor='#333333'" onMouseOut="style.backgroundColor='#000000'" width="125" bgcolor="#000000" height="18"> 
                      <p align="center"><a href="#" onMouseover="showmenu(event,linkset[6])" onMouseout="delayhidemenu()">Affiliates</a>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
        </td>
        <td valign="top" width="538"> 
          <table width="100%" border="0" cellspacing="1" cellpadding="1" height="279">
            <tr> 
              <td width="85%" valign="top" height="275">
                <table cellspacing=1 cellpadding=1 width=400 bgcolor=#ff0000 
                      border=0 align="center" height="222">
                  <tbody> 
                  <tr bgcolor=#ff0000> 
                    <td align=middle height="1" bgcolor="#ff0000"> 
                      <div align="left">
                        <p align="center"><b><font face="Verdana,Arial" size="1"><font color="#FFFFFF">&nbsp;</font></font><font face="Verdana,Arial" color="#000000" size="1">&nbsp;ºSite
                        Contentº</font></b></div>
                    </td>
                  </tr>
                  <tr bgcolor=#ffffff> 
                    <td align=middle bgcolor="#000000" height="217">
    <p align="center"><iframe name="main" src="http://www.angelfire.com/wrestling3/thewwcfefed/content.html" frameborder="no" width="500" height="371" marginheight="1"></iframe></p>
                    </td>
                  </tr>
                  </tbody> 
                </table>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr> 
        <td colspan="2" valign="top" width="739">
          <div align="center"><font size="1">&copy; 2003-04 WwcF Site Design by <a href="mailto:evilzdeathfire@hotmail.com">Jason<br>
            </a>All CSS/JavaScript is Copyrighted And Should Not Be Taken Without
            Permission.<br>
            All Rights Reserved.</font></div>
        </td>
      </tr>
    </table>
    </body>
    </html>

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You need to escape any single quotes you used for puncuation within the linkset array with a backslash (\)

    eg:
    62: linkset[4]+='<div class="menuitems"><a href="http://b4.boards2go.com/boards/board.cgi?user=divaboard">Diva\'s Board</a></div>'
    63: linkset[4]+='<div class="menuitems"><a href="http://b2g5.com/boards/board.cgi?user=WwcFOOC">OOC Board</a></div>'
    64:
    65: linkset[5]='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/confirm.html" Target="main">Confirmation</a></div>'
    66: linkset[5]+='<div class="menuitems"><a href="http://www.angelfire.com/wrestling3/thewwcfefed/tnb.html" Target="main">Thuggin\'N\'Buggin</a></div>'

    Also; linkset is undefined because you failed to open and define the array. Place the below immediately prior to your first linkset item. Which BTW should begin counting from 0 not 1
    linkset = new Array(6) (6 is the number of linkset items)

    .....Willy

  • #3
    New to the CF scene
    Join Date
    Feb 2004
    Location
    CA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks!

    THANK YOU SOOOOO MUCH! I changed it and it works now. WOW! I can't believe I forgot to start at (0) my bad,lol. Thanks again Willy


    -Jason


  •  

    Posting Permissions

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