|
-
Apr 6th, 2002, 12:12 PM
#1
Thread Starter
Member
frame problem
I have a problem with frames. I made a file called mainframes.html which is an empty HTML file. I have another file called buttonframe.html (the code at the end). The third file is called qwert.html and looks as follows:
<html>
<head>
<frameset rows="7%,93%">
<frame src="buttonframe.html">
<frame src="mainframe.html">
</frameset>
<title>probeer</title>
</head>
<body>
</body>
</html>
The button frame contains a dropdownbox with several links in it. If I click such a link then the output has to appear in mainframe.html. The code of buttonframe.html is given below. The function of the script is that if you change the value into the dropdownbox then one of the six links (to.html, mar.html,mam.html, om.html,bes.html and sj.html) will be loaded.
My question is what do I have to change if I want the new page to be loaded in mainframe.html ?
It is probably very simple but I am not that good in HTML and javascript.
<HTML>
<HEAD>
<script language="JavaScript">
function doArray() {
var arylnth = doArray.arguments.length;
for ( i = 0 ; i < arylnth ; i++ ) { this[i]=doArray.arguments[i] } }
function newpage() {
var choose = eval(document.dropdown.site.selectedIndex); if( (choose > 0) && (choose <
12) ) {
var section=new doArray( '',
'to.html',
'mar.html',
'mam.html',
'om.html',
'bes.html',
'sj.html');
location=section[document.dropdown.site.selectedIndex];
}
}
</script>
<TITLE></TITLE>
</HEAD>
<BODY>
<form name="dropdown" target="mainframe">
<p><select name="site" size="1" onchange="newpage();"
align="left">
<option selected>Afdeling.... </option>
<option>Tot</option>
<option>Mar</option>
<option>Mam</option>
<option>Om</option>
<option>Bes</option>
<option>Sj</option>
</select> </p>
</form>
</BODY>
</HTML>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|