Results 1 to 4 of 4
  1. #1

    How to Make a Search Form With Multiple Search Options (Pop-up Window)

    How to make a search form with multiple search options is a really useful article that I find here and I want to appreciate about that but still I need to do something with that code, what I need to do is show result page after search in a Pop-up window where I can set width and height attributes in the code.

    Code:
    <form name="searchform" onSubmit="return dosearch();">
    Search:
    <select name="sengines">
    <option value="http://www.google.com/search?q=" selected>Google</option>
    <option value="http://www.altavista.com/web/results?q=">Alta Vista</option>
    <option value="http://www.dogpile.com/info.dogpl/search/web/">Dogpile</option>
    <option value="http://search.yahoo.com/search?p=">Yahoo!</option>
    </select>
    For:
    <input type="text" name="searchterms">
    <input type="submit" name="SearchSubmit" value="Search">
    </form>
    Code:
    <script type="text/javascript">
    function dosearch() {
    var sf=document.searchform;
    var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value);
    window.location.href = submitto;
    return false;
    }
    </script>
    somewhere in that JS code should make the result page a Pop-up with width and height but I cant edit the code the way I want could some of you guys do that please, thanks so much

  2. #2
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79
    Replace this line:

    Code:
    window.location.href = submitto;
    With this:

    Code:
    window.open(submitto,"","width=400,height=300,status=yes,toolbar=no,menubar=no");
    Dave Owen
    MediaCollege.com

  3. #3
    New Member
    Join Date
    Apr 2011
    Location
    Montgomery, Alabama
    Posts
    1
    Looks like I'd be loving my stay in this site. The admin looks and obviously is a geek in his profession.
    I always see answers everytime I had a question in mind, a person already asked them and been answered.


    I want to plug, but I have changed of mind.

  4. #4
    Thanks buddy, This article is really valuable for people like me who are looking for the option.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Subscribe to us on YouTube