You are here: Re: using hyperlinks as submit buttons « HTML « IT news, forums, messages
Re: using hyperlinks as submit buttons

Posted by jojo on 10/25/03 11:51

Andy Dingley <dingbat@codesmiths.com> schrieb:

> jojo had the right idea, but coded
> it unworkably badly.

OK, you're right, seems like I haven't really thought about it before
posting it, I'm sorry. I forgot that the JS-Function has to be started
by click on an hyperlink...

This code will do it:

function SubmitForm(a){
document.forms[0].submit(); //if it is the first form in your code
return false;
}

To call the code add onclick="SubmitForm()" to your hyperlink.
Or, if it is not supposed to work for users with JavaScript disabled you
can set the href to "javascript:SubmitForm()", a Browser without
JavaScript will ignore this.

 

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

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