Script here:
$('#txt').click(function(){
$('#formID').attr('action', 'https://www.google.se/');
});
Html here:
<form method="post" name="myForm" action="http://www.youtube.com/" id="formID" >
<input type="button" id="txt" value="Submit" />
</form>
So basically what I want to happen is that when I press the submit button the action of the form will be changed to google and google will open. This is not working at all and I dont know why. :|