|
Posted by Hywel Jenkins on 02/24/06 22:05
In article <ZAELf.434$Ui.147@edtnps84>, desktop@ebinformatique.com
says...
> "Umesh" <mec.umesh@gmail.com> wrote in message
> news:1140775388.749370.260940@v46g2000cwv.googlegroups.com...
> > Hi
> >
> > Here is the sample code for my form, but problem is that it submits
> > twice in some cases when i click submit button.
> >
> Even though your question has to do with Javascript and this is an HTML
> group, here's something that might help you.
"Anything goes here. For anal HTML-only chat try CIWAH."
> Get rid of the onsubmit parameter on the form.
Pourquoi?
> Use it on the button itself, like this:
>
> <input type="button" onclick="validateform()" name="save" id="save"
> value="save">
>
> Now inside the function itself, if the form is set to be submitted, do this
> just before the return true line:
>
> document.abc.submit();
That's nuts. The OP now has a form that *won't* submit if JavaScript is
enabled.
The OP hasn't helped himself by failing to provide the appropriate code.
The snippet he gave is useless. It like saying "I can't get a good
picture on my TV. I've got a black cable and a blue one."
--
Hywel
http://kibo.org.uk/
Navigation:
[Reply to this message]
|