Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Form target url in a new window.

Reply
Thread Tools

Form target url in a new window.

 
 
Lee
Guest
Posts: n/a
 
      10-03-2005
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

 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      10-03-2005
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
 
Reply With Quote
 
 
 
 
Lee
Guest
Posts: n/a
 
      10-04-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in setting Target Node and Target Tree Property mohit ASP .Net 0 01-23-2008 05:41 AM
Form Target is _blank so grid pager opens new window Donald Welker ASP .Net Datagrid Control 0 06-24-2005 09:42 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
URL - substitution of a correct URL by a GUID like URL in favorites. Just D. ASP .Net Mobile 0 08-11-2004 04:26 PM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM



Advertisments