D
Dr. Leff
In Internet Explorer,
I get the error message "Object Expected" when
we click on the button ("Text") when I click in
Internet Explorer.
In Mozilla, clicking the button invokes the Action
(recordurlvote.scgi)
.. (Obviously, this is a simplified
version of a larger program I am developing.) Can somebody spot what
I am
doing wrong. I tried INPUT TYPE=BUTTON and various flavors of setting
up
the Javascript for the function being called!
<HTML><BASE HREF="/users/mflll/T/"><HEAD><TITLE> Hello</Title></
HEAD><BODY>
<HEAD><STYLE type="text/css">P.c {text-align: center} H1.c <text-
align:center></STYLE></HEAD>
aaadlm
<SCRIPT TYPE=JAVASCRIPT>
function s() {alert ("works");};
</SCRIPT>
<FORM METHOD="POST" ACTION="http://www.wiu.edu/cgi/users/mflll/T/
recordurlvote.scgi">
<BUTTON Value="Display" NAME="r"
onClick="s()">Text</BUTTON>
<P><INPUT TYPE="submit">
</FORM>
I believe the problem is the syntax to have a button inside a form do
one thing, a local javascript function, when the button is clicked
and another thing (the url specified in the ACTION)
when the submit button is invoked.)
I also tried putting a ;return false after the call to s() but that
did not
help
Dr. Laurence Leff, ASsociate Professor of Computer Science,
Western Illinois University, Macomb IL 61455 Fax 309 298 2302 Pager
309 367 0787
I get the error message "Object Expected" when
we click on the button ("Text") when I click in
Internet Explorer.
In Mozilla, clicking the button invokes the Action
(recordurlvote.scgi)
.. (Obviously, this is a simplified
version of a larger program I am developing.) Can somebody spot what
I am
doing wrong. I tried INPUT TYPE=BUTTON and various flavors of setting
up
the Javascript for the function being called!
<HTML><BASE HREF="/users/mflll/T/"><HEAD><TITLE> Hello</Title></
HEAD><BODY>
<HEAD><STYLE type="text/css">P.c {text-align: center} H1.c <text-
align:center></STYLE></HEAD>
aaadlm
<SCRIPT TYPE=JAVASCRIPT>
function s() {alert ("works");};
</SCRIPT>
<FORM METHOD="POST" ACTION="http://www.wiu.edu/cgi/users/mflll/T/
recordurlvote.scgi">
<BUTTON Value="Display" NAME="r"
onClick="s()">Text</BUTTON>
<P><INPUT TYPE="submit">
</FORM>
I believe the problem is the syntax to have a button inside a form do
one thing, a local javascript function, when the button is clicked
and another thing (the url specified in the ACTION)
when the submit button is invoked.)
I also tried putting a ;return false after the call to s() but that
did not
help
Dr. Laurence Leff, ASsociate Professor of Computer Science,
Western Illinois University, Macomb IL 61455 Fax 309 298 2302 Pager
309 367 0787