Unwanted form submission

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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
  <button name="Copy" value="Copy" OnClick="DoCopy()">Copy</button>

How do I stop it submitting under FireFox ?

Many thanks in advance,


Re: Unwanted form submission

Trapped in the departure lounge at alt.html, Aaron Gray got bored and
Quoted text here. Click to load it

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.

Dylan Parry
http://electricfreedom.org -- Where the Music Progressively Rocks!

Usenet: The first post is free, but the next will cost you your soul.

Re: Unwanted form submission

Quoted text here. Click to load it

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,


Site Timeline