Unwanted form submission

A

Aaron Gray

I have a form that I do not want to submit, rather use with JavaScripting.

It does not submit under IE but does under FireFox it does.

It must be a differnce in default behaviours of the browsers.

<form name="form1">
<textarea name="textarea" cols=80 rows=18>
This is a test
</textarea><br>
<button name="Copy" value="Copy" OnClick="DoCopy()">Copy</button>
</form>

How do I stop it submitting under FireFox ?

Many thanks in advance,

Aaron
 
D

Dylan Parry

Trapped in the departure lounge at alt.html, Aaron Gray got bored and
wrote:
<form name="form1">

I'm not going to ask why or even comment on the validity of your code,
but try adding:

onsubmit="return false;"

to the form element.
 
A

Aaron Gray

I'm not going to ask why or even comment on the validity of your code,
but try adding:

onsubmit="return false;"

to the form element.

That does the job, I am sure there was another way as I did not solve it
like that last time I had the problem. Unfortunately I could not remember
where I had the problem last :(

Thanks alot,

Aaron
 

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

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top