PDA

View Full Version : Using 3D Depressible Button with the input tag



mjsingh
04-14-2013, 06:24 PM
1) Script Title: 3D Depressible Button

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/3d_depressible_button/

3) Describe problem: I have found the 3d button on your website, but I am not able to edit it if I use it on input tag.
i.e <input type="submit"/>
and set classes according to it then it doesn't work does anyone knows how to put that button in an input tag?

jscheuer1
04-14-2013, 10:12 PM
I doubt it, but you can use javascript to have an a tag submit a form:


<a href="#" onclick="document.forms.formname.submit(); return false;" class="css3dbutton">Sign Up!</a>

Where formname is the name of the form you want to submit.

Of course this will not work if javascript is not available on the client's browsers. Most have it, but there should be a non-javascript fallback:


<form name="formname" action="#">
<!-- The rest of the form would go here -->
<script type="text/javascript">
document.write('<a href="#" onclick="document.forms.formname.submit(); return false;" class="css3dbutton">Sign Up!</a>');
</script>
<noscript><input type="submit" value="Sign Up!"></noscript>
</form>