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
    RAN
    RAN is offline
    New to the CF scene
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help me please with this code

    Hi,

    I need to change the drop-down box in this code with checkboxes and I dont know how. Please help me...
    Replace the "option value="www.javascriptkit.com"" for a checkbox and so one...

    Thank you in advance

    <script type="text/javascript">

    function Gsitesearch(curobj){
    var domainroot=curobj.domainroot[curobj.domainroot.selectedIndex].value
    curobj.q.value="site:"+domainroot+" "+curobj.qfront.value
    }
    </script>


    <form action="http://www.google.com/search" method="get" onSubmit="Gsitesearch(this)">

    <p>
    <input name="q" type="hidden" />
    <input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /><br />
    Search:
    <select name="domainroot">
    <option value="www.javascriptkit.com" selected="1">JavaScript Kit</option>
    <option value="www.dynamicdrive.com">Dynamic Drive</option>
    <option value="www.freewarejava.com">FreewareJava.com</option>
    </select>
    </p>

    </form>


    RAN

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    If you change the dropdown to checkboxes, then the user can select multiple sites and it will mess up the Google site search. AFAIK, you can only put one site in a Google site search.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,081
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    Radio buttons, perhaps?


  •  

    Posting Permissions

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