Change TABS link and auto load TAB page
Please help:
I am trying to change the link based on select list choices. Then auto select the correct tab. This seems to work except it won't load the tab page I want:
<!--The form fields: -->
<select name="SelectBy" id="SelectBy">
<option value="Customer_Number">Customer Number</option>
<option value="Branch">Branch</option>
</select>
<input name="SearchBy" type="text" id="SearchBy" value="70060850" />
<input type="button" name="GetData" id="GetData" value="GO" />
<!--The Tabs: -->
<div id="tabs">
<ul>
<li><a id="1" href="#">Pending</a></li>
<li><a id="2" href="#">Shipped</a></li>
<li><a id="3" href="#">Discrepency</a></li>
</ul></div>
<!--The script: -->
<script>
$(document).ready(function() {
$("#GetData").click(function(event) {
var b = $("#SearchBy").val();
var c = $("#SelectBy").val();
if (c === 'Customer_Number'){
$("#1").attr("href", "Pending.asp?c="+ b);
//alert($("#1").attr("href")); //}
$("#tabs").tabs("select",0);
}
;});
});
</script>