Hi I am creating a webpage that is going to input data into a table and I have to dynamically change the column span of the table regarding on a property.
I was looking to take the html code to create the table out of the original document and add it in to the original document when the page is loaded.
Here is the original file:
<!doctype html>
<html>
<head>
<link href='tt.css' rel='stylesheet' />
<script src='jquery-1.11.0.min.js'></script>
<script src='tt2.js'></script>
<title>Timetable</title>
</head>
<body>
<h1>Timetable</h1>
<div id='controls'>Enter Module Code:<input value='' id='module'/>
<button id='getModule'>Search Module Code</button>
</div>
<table id='fixedDetails'>
<caption>Fixed Details</caption>
<tr><th>Module Code</th><td id='moduleCode'></td></tr>
<tr><th>Module Name</th><td id='moduleName'></td></tr>
<tr><th>Module Leader</th><td id='moduleLeader'></td></tr>
<tr><th>Credit Value</th><td id='credit'></td></tr>
<tr><th>School Name</th><td id='schoolName'></td></tr>
</table>
<script src='table.html'></script>
</body>
</html>
This is the code for my table:
<!doctype html>
<html>
<table id='schedule'>
<caption>Schedule</caption>
<tr><th id='blank'></th><th>09</th><th>10</th><th>11</th><th>12</th><th>13</th><th>14</th><th>15</th><th>16</th><th>17</th></tr>
<tr><th>Mon</th><td id='mon09'></td><td id='mon10'></td><td id='mon11'></td><td id='mon12'></td><td id='mon13'></td><td id='mon14'></td><td id='mon15'></td><td id='mon16'></td><td id='mon17'></td></tr>
<tr><th>Tue</th><td id='tue09'></td><td id='tue10'></td><td id='tue11'></td><td id='tue12'></td><td id='tue13'></td><td id='tue14'></td><td id='tue15'></td><td id='tue16'></td><td id='tue17'></td></tr>
<tr><th>Wed</th><td id='wed09'></td><td id='wed10'></td><td id='wed11'></td><td id='wed12'></td><td id='wed13'></td><td id='wed14'></td><td id='wed15'></td><td id='wed16'></td><td id='wed17'></td></tr>
<tr><th>Thu</th><td id='thu09'></td><td id='thu10'></td><td id='thu11'></td><td id='thu12'></td><td id='thu13'></td><td id='thu14'></td><td id='thu15'></td><td id='thu16'></td><td id='thu17'></td></tr>
<tr><th>Fri</th><td id='fri09'></td><td id='fri10'></td><td id='fri11'></td><td id='fri12'></td><td id='fri13'></td><td id='fri14'></td><td id='fri15'></td><td id='fri16'></td><td id='fri17'></td></tr>
</table>
</html>
My problem is I don't know how to connect the two documents together