For all submits of all forms of a given site, I would like them to be replaced by a href links. The "a submit button" is done by applying a sprite technique.
So, something around those lines:
#formLogin .submit
{
width:60px;
background:url('../img/botaoLogin.png') no-repeat;
height:22px;
margin-left: 20px;
margin-top:3px;
text-indent: -9999px;
display:block;
float:right;
background-position: 0px 0;
}
#formLogin .submit {
outline: none; /*atenção acessibilidade @todo onfocus necessário! */
}
#formLogin .submit:hover {
background-position: 0px -22px;
}
#formLogin .submit:active {
background-position: 0px -45px;
}
On the HTML side of things, however, I would like to preserve the submit buttons for those that have javascript disabled.
<input type="submit" value="login"/>
<a href="javascript:document.forms['login'].submit()">Login</a>
I suppose that using jquery to .hide() the inputs of type submit and show the a with a class of submit, will work.
But if we have 4 forms with 4 "submit buttons" with different names, should I do one script for each?
I was hoping to have some help about sketching a javascript code that could be put on a "footer" of all my site pages that would replace the input types submits by anchors with a class .submitSomething, where something could be "login" or "register" (because each of those will have a specific image for sake of the sprite technique).
Hope I was clear enough. If not, please, let me know.
Thanks a lot in advance, MEM