Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Target inside form

Status
Not open for further replies.

Deathly4

Programmer
Joined
Aug 27, 2004
Messages
2
Location
DK
so, I got this form:


<form name="jump">

<select name="menu"

onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">

<option value="warhammer-subsite.php">Warhammer</option>

<option value="contact.php">Contact</option>

<option value="usercontact.php">User Contact</option>

</select>

</form>



but where should I put Target="content" in? anyway to do this?
 
Scrap that :(

use window.open() instead. It will reuse window/frame with the same name, if already opened.
 
You can put target property to a <form> element, which will cause your form to be sent to a specific frame or window after being submitted. There is no other place or usage of target property.
 
Vragabond, so you are saying that I should just put it into the <form>, right?

is this then correct?

<form target="content" name="jump">

because it don't work then.
 
Putting the "target" attribute in the form tag will make no difference to your code, as you are not submitting the form - you are directly setting "location".

Change "location = " to "content.location =" or "top.content.location =" instead.

Incidentally, you can probably remove the "value=GO" statement from your select box.

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top