A
Andy Fish
Hi,
I have a web page with some form controls on it. When the user presses the
'OK' button, some javascript talks to another page in another window. This
form is never destined for the server so I don't want it to have any concept
of "submit".
However, I have noticed that pressing enter in a text field will submit the
form to the server. Because I haven't specified a form action, it just tries
to post to the root URL for my site which obviously doesn't work.
Currently I'm doing the processing in the onclick event of the button
because I've heard that <form action="javascript:..."> is not portable. Is
there any way to specify that a form is not submittable? I don't really want
to have keypress handlers on every text field because I'm sure there is a
proper way to achieve this.
Andy
I have a web page with some form controls on it. When the user presses the
'OK' button, some javascript talks to another page in another window. This
form is never destined for the server so I don't want it to have any concept
of "submit".
However, I have noticed that pressing enter in a text field will submit the
form to the server. Because I haven't specified a form action, it just tries
to post to the root URL for my site which obviously doesn't work.
Currently I'm doing the processing in the onclick event of the button
because I've heard that <form action="javascript:..."> is not portable. Is
there any way to specify that a form is not submittable? I don't really want
to have keypress handlers on every text field because I'm sure there is a
proper way to achieve this.
Andy