Article View: comp.lang.javascript
Article #46Re: Please tell my why this won't work.
From: Aaron Peterson
Date: Thu, 08 Aug 1996 00:00
Date: Thu, 08 Aug 1996 00:00
73 lines
2957 bytes
2957 bytes
The Error:
JavaScript Error: file:/C|WINDOWS/Desktop/otog5.htm, line 7:
Window.Document.Form.text1 has no property named 'value'.
The HTML and SCRIPT and FORM:
<html>
<head>
<script language="JavaScript">
<!-- Hide
function test1(form) {
if (form.text1.value == "")
alert("Please enter a string!")
else {
if (form.text1.value == "INCOR")
parent.location.href="http://www.prostar.com/web/alpine/incor/";
else {
if (form.text1.value == "ALPine")
parent.location.href="http://www.prostar.com/web/alpine/welcome.htm";}
}
}
// -->
</script>
</head>
<body>
<form name="first" method="post">
THE ORGANIZATION YOU WANT TO GOTO IS<br>
<select name="test1">
<option selected value="ALPine">ALPine
<option value="INCOR">INCOR
</select>
<input type="button" name="button1" value="GOTO"
onClick="test1(this.form)">
<P>
</form>
</body>
</html>
The substitued FORM that does work:
<form name="first">
THE ORGANIZATION YOU WANT TO GOTO IS<br>
<input type="text" name="text1">
<input type="button" name="button1" value="GOTO"
onClick="test1(this.form)">
<P>
</form>
COMMENTS:
unfortunately I want a selection box instead of a text input.
I will want this script and form to be in
http://www.prostar.com/web/alpine/menu.htm
it is in a frame made by
http://www.prostar.com/web/alpine/index.htm
I want it to update the middle frame. its name is also middle.
Please help.
Aaron Peterson
Aaron.Peterson@mail.Prostar.com
ALPine information exchange
http://www.prostar.com/web/alpine/
Technical Details
Message-ID:
<320A3B5D.62DF@mail.prostar.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<4u7o8p$9j5@amber.ora.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7cbd,a6f41a01eab140ed X-Google-Attributes: gidf7cbd,public X-Google-Thread: fb3cb,a6f41a01eab140ed X-Google-Attributes: gidfb3cb,public X-Google-Thread: f5d71,a6f41a01eab140ed X-Google-Attributes: gidf5d71,public X-Google-Thread: 143f9e,a6f41a01eab140ed X-Google-Attributes: gid143f9e,public X-Google-Thread: 10d861,a6f41a01eab140ed X-Google-Attributes: gid10d861,public X-Google-Thread: 109f69,a6f41a01eab140ed X-Google-Attributes: gid109f69,public X-Google-Thread: fd796,a6f41a01eab140ed X-Google-Attributes: gidfd796,public X-Google-Thread: 10aaab,a6f41a01eab140ed X-Google-Attributes: gid10aaab,public From: Aaron Peterson <Aaron.Peterson@mail.prostar.com> Subject: Re: Please tell my why this won't work. Date: 1996/08/08 Message-ID: <320A3B5D.62DF@mail.prostar.com> X-Deja-AN: 173046911 references: <4u7o8p$9j5@amber.ora.com> content-type: text/plain; charset=us-ascii organization: Frugal Internet - Public access in Sumner, WA mime-version: 1.0 newsgroups: comp.lang.javascript,comp.lang.java.programmer.announce,comp.lang.java,alt.www.hotjava,biz.books.technical,misc.books.technical,alt.books.technical,comp.infosystems.www.authoring.cgi,comp.infosystems.www.authoring.html,comp.infosystems.www.authoring.misc,comp.infosystems.www.misc x-mailer: Mozilla 3.0b6Gold (Win95; I)