Forum Moderators: open
I was wondering if it's possible to navigate a link to an IFRAME in following use.
I made a table out of 3 rows and 3 columns.
They are numbered as:
1 2 3
4 5 6
7 8 9
I would like to have a pull down menu in cell 2.
An IFRAME is situated in cell 5.
A link selected in the menu (cell 2) must be opened in cell 5 (IFRAME). Is this possible? And if so how?
Thank you.
<table>
<tr>
<td>1</td>
<td>
<select onchange="document.frames[cell5].document.location=this.options[this.selectedIndex].value;">
<option value="page1.html" selected>Page 1</option>
<option value="page2.html">Page 2</option>
<option value="page3.html">Page 3</option>
<option value="page4.html">Page 4</option>
</select>
</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td><iframe id="cell5" name="cell5" src="page1.html" width="300" height="200"></iframe></td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</table>
'document.frames[...].document' is nul or not an object
----------------------------------------------------------
Cell 2 content
----------------------------------------------------------
<tr>
<td width="100%">
<select onchange="document.frames[myframe].document.location=this.options[this.selectedIndex].value;">
<option value="page1.htm" selected>Page 1</option>
<option value="page2.htm">Page2</option>
<option value="page3.htm">Page3</option>
<option value="page4.htm">Page4</option>
</select>
</td>
</tr>
----------------------------------------------------------
.
.
.
----------------------------------------------------------
Cell 5 content
----------------------------------------------------------
<td width="700" height="500">
<iframe id="myframe" name="myframe" src="page1.htm" width="100%" height="100%" frameborder="0"></iframe>
</td>
----------------------------------------------------------
what is wrong or what do I wrong?
Thank you