help on parent.location problem under IE and netscape

S

Shaoyong Wang

I used php to generate the following html:

....

<meta content="text/javascript" name=Author
http-equiv="Content-Script-Type">

....
<option value="Words and Definitions" onClick="parent.location='#Words
and Definitions'">Words and Definitions</option>

.....

<a name="Words and Definitions">Words and Definitions</a>

....

What I want here is to let the user jump to the particular position
(using <a name=".."></a>, as shown) when choosing an item from drop-down
list (using <option value=...>, as shown).

The above html works well under netscape. It doesn't work under IE. Any
suggestions on how to make it work under both?

Thanks.
 
K

kaeli

...

What I want here is to let the user jump to the particular position
(using <a name=".."></a>, as shown) when choosing an item from drop-down
list (using <option value=...>, as shown).

The above html works well under netscape. It doesn't work under IE. Any
suggestions on how to make it work under both?

IE doesn't support onClick of select elements.
You have to use onChange. Should work in both browsers.

<select onChange='parent.location=this.options
[this.selectedIndex].value;'>
<option value='#Words And Definitions'>Words And Definitions</option>

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top