That script doesn't really do that, try jQuery .load():
http://home.comcast.net/~jscheuer1/s...es-jq/demo.htm
demo.htm:
Code:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
jQuery(function($){
$('#tableselect').change(function(){
$('#resultarea').load('table.htm #table_' + this.options.selectedIndex);
}).trigger('change');
});
</script>
</head>
<body>
Choose Table: <select id="tableselect">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select>
<div id="resultarea"></div>
</body>
</html>
table.htm:
Code:
<div>
<table id="table_0">
<tr>
<td>Table #1</td>
</tr>
</table>
<table id="table_1">
<tr>
<td>Table #2</td>
</tr>
</table>
<table id="table_2">
<tr>
<td>Table #3</td>
</tr>
</table>
<table id="table_3">
<tr>
<td>Table #4</td>
</tr>
</table>
<table id="table_4">
<tr>
<td>Table #5</td>
</tr>
</table>
<table id="table_5">
<tr>
<td>Table #6</td>
</tr>
</table>
<table id="table_6">
<tr>
<td>Table #7</td>
</tr>
</table>
<table id="table_7">
<tr>
<td>Table #8</td>
</tr>
</table>
<table id="table_8">
<tr>
<td>Table #9</td>
</tr>
</table>
<table id="table_9">
<tr>
<td>Table #10</td>
</tr>
</table>
</div>
Bookmarks