Bert Visscher
2004-08-10 08:25:18 UTC
Hello everyone,
I would like to let visitors of my website be able to go directly to a
desired page, by using a URL like www.example.com?progname. I thought I
could do this as follows:
<html>
<frameset rows="88,*">
<frame name="head" noresize src="head.htm" />
<frameset cols="152,*">
<frame name="menu" noresize src="menu.htm" />
<script language="JavaScript">
prog = location.search
prog = prog.substr(1)
prog = prog.split("&")
if (prog=="progname") { document.write ("<frame name='body' noresize
src='progpage.htm' />") }
else if (prog==...
...
else { document.write ('<frame name="body" noresize src="mainpage.htm"
/>') }
</script>
</frameset>
</frameset>
</html>
I see that the above code doesn't produce a page for the body, but I can't
see why? Could anybody please tell me what I'm overlooking?
TIA and regards, Bert Visscher.
I would like to let visitors of my website be able to go directly to a
desired page, by using a URL like www.example.com?progname. I thought I
could do this as follows:
<html>
<frameset rows="88,*">
<frame name="head" noresize src="head.htm" />
<frameset cols="152,*">
<frame name="menu" noresize src="menu.htm" />
<script language="JavaScript">
prog = location.search
prog = prog.substr(1)
prog = prog.split("&")
if (prog=="progname") { document.write ("<frame name='body' noresize
src='progpage.htm' />") }
else if (prog==...
...
else { document.write ('<frame name="body" noresize src="mainpage.htm"
/>') }
</script>
</frameset>
</frameset>
</html>
I see that the above code doesn't produce a page for the body, but I can't
see why? Could anybody please tell me what I'm overlooking?
TIA and regards, Bert Visscher.