dg*****@erols.com wrote:
Actually, that's what I tried initially,
*What* did you try? Please quote what you are referring to,
trimming it to the parts you are directly referring to.
<http://jibbering.com/faq/faq_notes/pots1.html>
but am getting the "undefined" error. I have <option
value="[filename].html">Page 1, but when I pick Page 1 in the drop box I
get "...The page cannot be displayed" with [path]\undefined (IE) or
"...unable to find the file or directory named [path]/undefined" (NS).
You are trying to access a variable or property that was not
declared/defined or has the `undefined' value. Therefore the
resulting URI refers to a resource that does not exist (404).
The target file (resource) is in the same directory as the calling page.
This behavior is the same whether I am viewing the pages as files in my
development environment or as web pages on my server.
First, change
<SELECT name="guidelinks"
onChange="window.location=document.guideform.guide links.options[document.guideform.guidelinks.selectedIndex].value">
into
<select onchange="location = this.options[this.selectedIndex].value;">
Your referencing is proprietary (document.formName.elementName instead
of document.forms['formName'].elements['elementName']), therefore
error-prone. It is also inefficient (`this' suffices).
You don't have to explicitly set the selected property of the
first `option' element; AFAIK that is the default. You don't
even have to specify a URI for the `value' attribute of that
option if you change location only if the value does not match
a specific value.
Second, don't use `select' elements for links (they won't work
without client-side scripting), use links (in [formatted] lists,
if necessary) instead. See David's followup.
HTH
PointedEars