Blank Targets help please?

R

ross

I would like to make the targets _blank in this menu code. Not working
unless used this way. Can you advise on this please? I appreciate this
newsgroup. Dick Ross


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Jump Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form method="POST" name="mapform" align="left">
<p align="center"><font color="#0000FF" size="6">
<select
name="jump" size="1">
<option value="value" selected>Click here to browse</option>
<option value="http://jcprd.com/apps/events/"
target="_blank">Johnson
County Parks and Recreation</option>
</select>
<input type="button" value="Go!"
onclick="location = '' + document.mapform.jump.options[
document.mapform.jump.selectedIndex ].value;">
</font></p>
</form>
</body>
</html>
 
J

Jonathan N. Little

ross said:
I would like to make the targets _blank in this menu code. Not working
unless used this way. Can you advise on this please? I appreciate this
newsgroup. Dick Ross


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Jump Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form method="POST" name="mapform" align="left">

no attribute "ALIGN" for element FORM and missing required "ACTION"
<p align="center"><font color="#0000FF" size="6">

If this deprecated FONT element is an attempt to style the form's drop
list box it doesn't, lookup CSS

<select
name="jump" size="1">
<option value="value" selected>Click here to browse</option>
<option value="http://jcprd.com/apps/events/"
target="_blank">Johnson
County Parks and Recreation</option>

no attribute "TARGET" for element OPTION
</select>
<input type="button" value="Go!"
onclick="location = '' + document.mapform.jump.options[
document.mapform.jump.selectedIndex ].value;">
</font></p>
</form>
</body>
</html>

Will not function if JavaScript is disabled.

Lastly, what happens if user clicks "go" /without/ changing the drop
list box from its default "Click here to browse", Eh?
 
J

Jonathan N. Little

ross said:
I would like to make the targets _blank in this menu code. Not working
unless used this way. Can you advise on this please? I appreciate this
newsgroup. Dick Ross


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Jump Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form method="POST" name="mapform" align="left">

no attribute "ALIGN" for element FORM and missing required "ACTION"

<p align="center"><font color="#0000FF" size="6">


If this deprecated FONT element is an attempt to style the form's drop
list box it doesn't, lookup CSS
<select
name="jump" size="1">
<option value="value" selected>Click here to browse</option>
<option value="http://jcprd.com/apps/events/"
target="_blank">Johnson

no attribute "TARGET" for element OPTION
County Parks and Recreation</option>
</select>
<input type="button" value="Go!"
onclick="location = '' + document.mapform.jump.options[
document.mapform.jump.selectedIndex ].value;">
</font></p>
</form>
</body>
</html>


Will not function if JavaScript is disabled.

Lastly, what happens if user clicks "go" /without/ changing the drop
list box from its default "Click here to browse", Eh?
 
R

ross

I appreciate your assistance. I am a real novice and do not understand your
notes? I am putting this into Dreamweaver and the "_blank" does not allow
the script to make an independent page, but replaces the existing page. I am
hoping to make an independent page when the viewer clicks on go. Any ideas,
please? Dick

Jonathan N. Little said:
ross said:
I would like to make the targets _blank in this menu code. Not working
unless used this way. Can you advise on this please? I appreciate this
newsgroup. Dick Ross


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Jump Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form method="POST" name="mapform" align="left">

no attribute "ALIGN" for element FORM and missing required "ACTION"

<p align="center"><font color="#0000FF" size="6">


If this deprecated FONT element is an attempt to style the form's drop
list box it doesn't, lookup CSS
<select
name="jump" size="1">
<option value="value" selected>Click here to browse</option>
<option value="http://jcprd.com/apps/events/"
target="_blank">Johnson

no attribute "TARGET" for element OPTION
County Parks and Recreation</option>
</select>
<input type="button" value="Go!"
onclick="location = '' + document.mapform.jump.options[
document.mapform.jump.selectedIndex ].value;">
</font></p>
</form>
</body>
</html>


Will not function if JavaScript is disabled.

Lastly, what happens if user clicks "go" /without/ changing the drop list
box from its default "Click here to browse", Eh?
 
J

Jonathan N. Little

ross said:
I appreciate your assistance. I am a real novice and do not understand your
notes? I am putting this into Dreamweaver and the "_blank" does not allow
the script to make an independent page, but replaces the existing page. I am
hoping to make an independent page when the viewer clicks on go. Any ideas,
please?

Yes, drop Dreamweaver and learn HTML, it really is not that difficult.
Many many tutorials online...

A good place to start, lists all ELEMENTS and their *valid* ATTRIBUTES

http://www.w3.org/TR/html4/index/elements.html

for in your code:

FORM does not have an ALIGN attribute
FORM must have an ACTION attribute which yours does not have
OPTION does not have an a TARGET attribute (it is not a link)... that is
why your code will not open an new window. You should try to anyway see:

(why target="_blank" bad - Google Search)
http://www.google.com/search?hl=en&q=why+target="_blank"+bad&spell=1

lastly with your code leave the select box on "Click here to browse" and
click "go" and see the error...
 
?

=?ISO-8859-1?Q?G=E9rard_Talbot?=

ross wrote :
I appreciate your assistance. I am a real novice and do not understand your
notes?

Your markup code is invalid at the places Jonathan told you about.

Web authoring FAQ
http://www.htmlhelp.com/faq/html/

I am putting this into Dreamweaver

Forget Dreamweaver. That software is not able to help you, nor prevent
you from making design mistakes.
and the "_blank" does not allow
the script to make an independent page, but replaces the existing page. I am
hoping to make an independent page when the viewer clicks on go.

Allowing a viewer to change a page is usually done with a link or even
when submitting a form. Not via a drop-down list: you're misusing the
select.

Any ideas,
please? Dick

Just like Jonathan told you, drop Dreamweaver and start learning HTML.

Quality tips for webmasters:
http://www.w3.org/QA/Tips/

Forget <font>, use CSS
http://www.w3.org/QA/Tips/font-size#goodpractice

Gérard
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top