www.webdeveloper.com
Results 1 to 3 of 3

Thread: How to makefirst item in the menu clickable

  1. #1
    Join Date
    Nov 2011
    Posts
    13

    How to makefirst item in the menu clickable

    I want to first item in the menu clickable (go to the page I specified) how to do this?


    http://6g6.eu/sih0-111snap000708.jpg

    Head section:
    Code:
    <script language="javascript" type="text/javascript">
    <!--
    function menu_goto( menuform )
    {
        var baseurl = "http://www.aymavisi.org/" ;
        selecteditem = menuform.newurl.selectedIndex ;
        newurl = menuform.newurl.options[ selecteditem ].value ;
        if (newurl.length != 0) {
          location.href = baseurl + newurl ;
        }
    }
    //-->
    </script>

    Body part:

    Code:
    <select name="newurl" onchange="menu_goto(this.form)" style=" color: #FFFFFF; text-decoration: none; font-family: Tahoma; font-weight: bold; text-align: center; background-color: #444577;padding: 2px; font-size:9pt; width:130" size="1" id="menu">
    <option value=""></option>
    <option value="index.html">Ana Sayfa</option>
    <option value="8 Felsefe.htm">Felsefe</option>
    <option value="9 Siir.htm">Şiir</option>
    <option value="2 Makale.htm">Makale</option>
    <option value="4 Hikaye.htm">Hikaye</option>
    <option value="3 Psikoloji.htm">Psikoloji</option>
    <option value="5 Guncel.htm">Güncel</option>
    <option value="6 Kitap.htm">Kitap</option>
    <option value="7 Muzik.htm">Müzik</option>
    <option value="999 Benden.htm">Benden</option>
    <option value="99 Egzersiz.htm">Egzersiz</option>
    <option value="hata raporu.html">Hataları bildirin</option>
    <option value="1 yeniler.html">Yeni eklenenler</option>
    <option value="../ziyareci defteri/index.php?&amp;mots_search=&amp;lang=english&amp;skin">
    Ziyaretçi defteri</option>
    </select>

  2. #2
    Join Date
    Nov 2011
    Posts
    13

  3. #3
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,654
    insert an empty option before the first one

    Code:
    <option></option>
    <option value="index.html">Ana Sayfa</option>

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