Form target url in a new window.

L

Lee

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
 
D

David Dorward

Lee said:
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?

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.
 
L

Lee

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top