tags:

views:

17

answers:

3

I really want to have a link, such as, "Save" that act the same way as a input type submit button?

I never figured out how to do this, is it even possible? How?

+1  A: 

You can just style the button to look like a link:

input[type="submit"]
{
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}
Developer Art
don't forget `cursor: pointer`
Litso
Right. Thanks..
Developer Art
and the border: none; .. works great!
Karem
A: 

its possible using javascript. like this:

<form name="theform" ...>
<a href="javascript:document.theForm.submit();">Save</a>
</form>

but i would suggest to style a button to look as a link, so you have no problem with clients without javascript

Joe Hopfgartner
A: 

Random example:

Form:

<form id="myform" name="myform" method="post" action="something.php">

Submit link: <a href="javascript:postform()">Click!</a>

JavaScript:

<script language="JavaScript" type="text/javascript">
function postform( )
{
  document.getElementById('myform').submit() ;
}
</script>
Litso