Here's my code:
<script>
$("#btn1").click(function(){
baseURL='http://domain.com/base1';
$("input#Race").val("btn2");
$("input#Race").attr("id","btn2");
});
$("#btn2").click(function(){
baseURL='http://domain.com/base2';
$("input#pet").val("btn1");
$("input#pet").attr("id","btn1");
});
</script>
<td><input class="inputbutton" id="btn1" type=button value="btn1"></td>
What's supposed to happen, when you click the button, it changes between btn1 and btn2 and also change the baseURL variable.
But when I click the button, nothing happens.