Jump to content

addAttrib not working


Recommended Posts

i'm trying to change the submit button's value and style on certain condition using the following code

<script>$(document).ready(function() {	$("#conpass").keyup(function() {		if ($("#uok").val()=="ok" && $("#compok").val()=="ok" && $("#passok").val()=="ok" && $("#cpok").val()=="ok") {			$("#register").removeAttr('disabled');			$("#register").addClass('enabled');			$("#register").removeAttr('value');			$("#register").addAttr('value', 'Register');			$("#register").removeClass('disabled');		}	})});</script>

everything is working fine but addAttr('value', 'Register') is not working. after removing the default value, it changes it to 'Submit'. but I wish to change it to 'Register'.


please guide what I did wrong.........

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...