I currently have a button tag the a ‘submit’ type and when clicked it executes javascript.
Button:
<button class="glossyBtn" type="submit" value="Cancel" onclick="goBack(); return false;">
Script:
<script type="text/javascript">
function goBack() {
window.history.back();
}
</script>
Save Script:
<script type="text/javascript">
$(function () {
$('form').submit(function () {
$('#saveButton').attr('disabled', 'disabled');
});
});
</script>
I want to change it to
<a class="glossyBtn" type="submit"> Cancel</a>
how can i make the link execute properly without using the button tag?
Thanks!
I believe this is how you would use javascript in a regular link.
EDIT: You can remove the type=”submit” since it is no longer a button.