Click to See Complete Forum and Search --> : form handler does not work in page top border when page is viewed


johncrook
05-29-2003, 08:50 AM
Hi - I am writing a page using FrontPage2000 and using a page border to make things easier for others to add content to the site. When I open up the page (<root>/index.htm)which calls the border (<root>/_border/top.htm) the form below does not function yet it does in the border page. What do I need to do to correct this? Do I add a location for the handler as well?

This is the code:

<head> etc...

<SCRIPT LANGUAGE="JavaScript">


<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>

</head>





this is the form:

<body>

<form name="form">
<p align="left">
<b><font face="Verdana" size="2" color="#990099">Visit our other sections:</font><font face="Verdana" size="2" color="#800080">
<select name="site" size=1 onChange="javascript:formHandler()" style="font-size: 10pt; font-family: Verdana">
<option selected>-- Click here! --
<option value="epilepsy/index.htm">Epilepsy Home Page</option>
<option value="http://www.GetGoing.org.uk">Free Holidays Abroad</option>
<option value="searchstigma/index.htm">Search Stigma</option>
</select>
</form>

</body>

Gollum
05-29-2003, 09:25 AM
Are you using frames? If so, then you will need to use the parent window's location...

function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.parent.location.href = URL;
}

johncrook
05-29-2003, 05:16 PM
It looks like frames but it is a navigation border using a stylesheet to load the pages ie: top.htm, bottom.htm and left.htm

so the page is borrowing the same top, left and bottom information for each page.

The frontpage help doesn't go this far into designing borders.

any other ideas? John.

file attached in .txt form (save as .htm to view)