search form to open in new window

Discussion in 'HTML & Website Design' started by coldclimber, Jun 11, 2005.

  1. #1
    Hi I have created a new site yahoogossip and i have added their search box to the site but i would like it to open a new window when a search is performed i have played with it a bit to get the yahoo slogen to sit on top and have tried various target="_blank" in curtain areas of the form but it does not work beow is the code if anyone knows how to do it thanks :eek:

    <form method=get action="http://search.yahoo.com/bin/search" style="float: right;">

    <a href="http://www.yahoo.com/">
    <img src="http://us.geo1.yimg.com/pic.geocities.com/us/i/geo/ao/us_cat.gif" width=151 height=39 border=0 align=top alt="[ Yahoo! ]"></a><br>

    <input type="text" name="p" value="" size=18>
    <input type="submit" name="name" value="Submit Query">

    <font size=1>
    <a href="http://search.yahoo.com/search/options">
    options</font></a>
    </form>
     
    coldclimber, Jun 11, 2005 IP
  2. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #2
    The target="_blank" goes in the form tag, ie;

    <form method=get action="http://search.yahoo.com/bin/search" style="float: right;" target="_blank">

    <a href="http://www.yahoo.com/">
    <img src="http://us.geo1.yimg.com/pic.geocities.com/us/i/geo/ao/us_cat.gif" width=151 height=39 border=0 align=top alt="[ Yahoo! ]"></a><br>

    <input type="text" name="p" value="" size=18>
    <input type="submit" name="name" value="Submit Query">

    <font size=1>
    <a href="http://search.yahoo.com/search/options">
    options</font></a>
    </form>
     
    Colleen, Jun 12, 2005 IP
  3. coldclimber

    coldclimber Peon

    Messages:
    266
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Excellent thanks for that I must have tried every where but that spot, althought i think i did this

    '<form method=get action="http://search.yahoo.com/bin/search" style="float: right target="_blank"> missising out the ;" between the two comments

    Thanks for your help :eek:
     
    coldclimber, Jun 12, 2005 IP
  4. Colleen

    Colleen Illustrious Member

    Messages:
    6,777
    Likes Received:
    725
    Best Answers:
    1
    Trophy Points:
    430
    #4
    You're welcome.

    I don't think that would have worked even with the ";"

    :)
     
    Colleen, Jun 12, 2005 IP