Form target url in a new window.

Discussion in 'HTML' started by Lee, Oct 3, 2005.

  1. Lee

    Lee Guest

    Hi,

    Could someone help me make this target url open up in a new window
    please. I have put the target tag option where I think it should be but
    it does not work?

    <form action="http://www1.blablabl.co.uk/partners.asp">
    <input type="hidden" name="page" value="searchresults" />
    <input type="hidden" name="rid" value="rooml">
    <div class="inputtext" align="center">
    <select name="room" class="inputtext" style="width:180px;">
    <option value="0">I NEED A Room to Rent in:
    <option value="1">I HAVE A Room to Rent in:
    </select>
    <br>
    </select>
    <select name="zip" class="inputtext" style="width:180px;">
    <option>Select A City
    <option value="AB10">Aberdeen
    <option value="BT11">Belfast
    </select>
    </div>
    <div align="right" style="padding:10px; width:231; height:36"><input
    type="submit" value="GO" class="button"></div>
    <a target="_blank" href="http://www1.blablabla.co.uk/?rid=rooml"><img
    src="http://www1.flatmateclick.co.uk/images/tinylogo.gif" width="124"
    height="28" border="0" /></a>
    </div></td>
    </tr>
    </table>
    </form>

    Thanks

    Lee
     
    Lee, Oct 3, 2005
    #1
    1. Advertising

  2. Lee wrote:

    > Could someone help me make this target url open up in a new window
    > please.


    Please no. New windows are horrible and cause usability and accessibility
    problems.

    > I have put the target tag option where I think it should be but
    > it does not work?


    > <form action="http://www1.blablabl.co.uk/partners.asp">


    The target ATTRIBUTE is allowed on form elements.

    > <input type="hidden" name="page" value="searchresults" />


    In HTML you shouldn't have that "/" there.

    > <option value="0">I NEED A Room to Rent in:


    In XHTML the end tag for <option> is required. You should probably made a
    decision about which one you are using.


    > </select>
    > <br>
    > </select>


    You've gone wrong here. http://validator.w3.org/ would catch a number of
    these problems. Its not very nice to ask people in a Usenet group to do
    something a machine can do for you easily.

    > <div align="right" style="padding:10px; width:231; height:36"><input


    231 what? 36 what? You should probably validate your CSS too.

    > <a target="_blank" href="http://www1.blablabla.co.uk/?rid=rooml"><img
    > src="http://www1.flatmateclick.co.uk/images/tinylogo.gif" width="124"
    > height="28" border="0" /></a>


    Well you have a link that opens in a new window (where's the alt attribute
    on that image?). It won't submit the form though.


    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Oct 3, 2005
    #2
    1. Advertising

  3. Lee

    Lee Guest

    Thanks for the information. It is navigating in a new window because
    the target is another website.

    The form as copied in the message works fine. It's just that it still
    opens up in the current window and not a new one.

    I will run it through the validator (did not know it existed). But the
    validator don't tell me how to make it open in a new window I assume.
    Well unless it sees I have misplaced the target option. I will run it
    through.

    Cheers

    Lee
     
    Lee, Oct 4, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mohit
    Replies:
    0
    Views:
    582
    mohit
    Jan 23, 2008
  2. AAaron123
    Replies:
    2
    Views:
    7,055
    AAaron123
    Jan 5, 2009
  3. Donald Welker

    Form Target is _blank so grid pager opens new window

    Donald Welker, Jun 24, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    168
    Donald Welker
    Jun 24, 2005
  4. Simon Wigzell

    Target for form to open in same window

    Simon Wigzell, Jun 14, 2004, in forum: Javascript
    Replies:
    1
    Views:
    135
    David Dorward
    Jun 14, 2004
  5. Danny
    Replies:
    1
    Views:
    141
    kaeli
    Jul 21, 2004
Loading...

Share This Page