www.webdeveloper.com
Results 1 to 3 of 3

Thread: input type="button" multiple tasks

  1. #1
    Join Date
    Dec 2009
    Posts
    92

    input type="button" multiple tasks

    Hi,

    I have a search engine linked to an select option list:

    Code:
    <select  id="web"  class="select"  >
        <option value="http://www.google.com/" >Google</option>
        <option value="http://www.yahoo.com/"  >Yahoo</option>
    </select> 
    
    <input type="button"  value="Search"
    onclick="ob=this.form.web;window.open(ob.options[ob.selectedIndex].value); startsearch('one'); return false;" class="button" />
    If I click the search button with no search query it works wel and the selected website is opend in a new window. However; if I type a search query then two windows are opened, one with the search query and the other without. How can I separate, so that if a search query is entered only (one window) with the search results is opened?

  2. #2
    Join Date
    Aug 2007
    Posts
    3,767
    Type it where exactly? What does startsearch do? For Google anyway, to open a window with a search query, you would open "http://google.com/#q=does+this+work"

  3. #3
    Join Date
    Dec 2009
    Posts
    92
    Quote Originally Posted by Declan1991 View Post
    Type it where exactly? What does startsearch do? For Google anyway, to open a window with a search query, you would open "http://google.com/#q=does+this+work"
    Hi Declan1991 ,

    I'm sorry for not responding. I have been to busy (still am). However I am planning to look in to this in the distant future.

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