View Full Version : Anchor not working correctly with NS7

12-28-2005, 04:02 PM
The below takes me from a selection option on one page to another page (thePage.cfm where it puts me in a specific part of the page using an anchor).
It works great in IE but Netscape 7 doesnt go to the anchor part of thePage.cfm. It seems to only partially take me to the correct part of the page where it seems to go to high and only partially show the correct section. Please advise how I can correct it with NS7?

function goToOtherPage()
<select name = "myField" onchange="return goToOtherPage()">
<option value="thePage.cfm#foo"></option>


<p>Info line one </p>
<p id="foo">Info part for anchor to go to. </p>

12-28-2005, 04:07 PM
<p name="foo">

12-28-2005, 06:07 PM

I tried that and it didnt work.

Any other suggestions?

12-29-2005, 08:19 AM
1. location is the window's attribute, not the document's
2. It is enough to use select's value, as it is always the same with the selected option's value


You may also shorten the code like this:

<select name = "myField" onchange="location.href=this.value">

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum