You are here: Re: Page Submits twice « HTML « IT news, forums, messages
Re: Page Submits twice

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация