I have a form that is meant to change the users email address, it works as when you click to confirm the new address i created code to open up a dialog box "on success". then this dialog box is a relogin box and i have an email and password field and button. When I click the button I set it so that console.log would echo "clicked", it doesnt do that. So is it actually possible to do what i need?The update button \[code\]$('input[name=updatedetails]').click(function(){ var newEmailValue = http://stackoverflow.com/questions/10553818/$('input[name=newemailconfirm]').val(); var accountID = $('input[name=userid]').val(); var dataString='email='+ newEmailValue +'&userid='+accountID; $.ajax({ type:"POST", url:"../assets/inc/user-change-email.php", data:dataString, dataType:'html', context:document.body, global:false, async:false, success:function(data){ console.log(data); //document.location ="/"; var overlay = $("<div/>").addClass("overlay"); var logindialog = $("<div/>").addClass("popup-login"); $("body").append(overlay); $("body").append(logindialog); $(".popup-login").prepend('<p><label for="email">Email</label><input type="text" name="email" id="email"></p><p><label for="password">Password</label><input type="password" name="password" id="password"></p><input type="button" name="relogindude" value="http://stackoverflow.com/questions/10553818/sign in">'); $(".overlay").fadeIn(); $(".popup-login").fadeIn(); } }); }); \[/code\]The ReLogin Button\[code\]$('input[name=relogindude]').click(function(){ console.log("clicked"); var email = $('input[name=email]').val(); var password = $('input[name=password]').val(); var dataString='email='+ email +'&password='+password; console.log(dataString); $.ajax({ type:"POST", url:"../assets/inc/login.php", data:dataString, dataType:'html', context:document.body, global:false, async:false, success:function(data){ window.location.reload(); } }); }); \[/code\]