Hi, I am new here and would appreciate anyone who could help me out with the below coding for my site. (I have been figuring it out for hours, but to no avail!
)
Its confusing due to the modifications I had made to the codes, but I will try to describe my problem in the best way that I can.
Firstly, I had inserted a drop down list menu in the site, and I want the user to be able to read the information on the same page by clicking on the specified option in the menu. I do not have any specific a href links to direct the <option value""> part. I need to know if its possible to use "div id" as the target instead?
Supposedly, the code from my site for the menu is like this:
This is the original code before I added any changes. The "???" above indicate the current problem I am facing now.
As I am a noob to HTML, I am not sure on how to go about the coding in the <option value=""> part. I know that a link from the page can be inserted in which will lead the user to it once clicked. But however, I do not have any specific urls to insert in it. I have a text area in the site, and I only want the information in it to display within the text area once clicked. In other words, the main url remains unchanged.
After my "random modifications" to the code yesterday while using Firefox, I managed to get it working. (As you can see below, I replaced an "#onClick#" in the <option value> instead of the usual linkages, and added a "getElementbyId" at the back to get the information to show up once the option is being clicked from the dropdown menu. I had a div id. To my surprise, it actually works... but only in Firefox, and not IE.)
With this code in IE browser, everything will look fine at first glance. The menu can be scrolled. However, it doesn't react when I click on the options. The page remains intact, and simply display no information at all. It seems that the "#onClick# command can only work in Firefox.
I need it to work in IE too, but may I ask how do I go about with the <option value> thingy? Am I able to use a <div id> code to lead it to display the information needed within the text area?
I do hope the way I described it isn't causing any confusion! Thank you in advance!

Its confusing due to the modifications I had made to the codes, but I will try to describe my problem in the best way that I can.
Firstly, I had inserted a drop down list menu in the site, and I want the user to be able to read the information on the same page by clicking on the specified option in the menu. I do not have any specific a href links to direct the <option value""> part. I need to know if its possible to use "div id" as the target instead?
Supposedly, the code from my site for the menu is like this:
<form>
<select onChange="location=this.options[this.selectedIndex].value;" style="font-family:'Chaparral Pro';color:#FFCCFF;background-color:#bd0a0a; font-weight:bold; font-size:13pt;">
<option value="#"> Main Menu </option>
<option value="????"> Chapter 1 </option>
<br></form>
<select onChange="location=this.options[this.selectedIndex].value;" style="font-family:'Chaparral Pro';color:#FFCCFF;background-color:#bd0a0a; font-weight:bold; font-size:13pt;">
<option value="#"> Main Menu </option>
<option value="????"> Chapter 1 </option>
<br></form>
As I am a noob to HTML, I am not sure on how to go about the coding in the <option value=""> part. I know that a link from the page can be inserted in which will lead the user to it once clicked. But however, I do not have any specific urls to insert in it. I have a text area in the site, and I only want the information in it to display within the text area once clicked. In other words, the main url remains unchanged.
After my "random modifications" to the code yesterday while using Firefox, I managed to get it working. (As you can see below, I replaced an "#onClick#" in the <option value> instead of the usual linkages, and added a "getElementbyId" at the back to get the information to show up once the option is being clicked from the dropdown menu. I had a div id. To my surprise, it actually works... but only in Firefox, and not IE.)
<option value="#onClick#" span style="cursor: nw-resize" onClick="document.getElementById
('welcome').innerHTML=document.getElementById('chapter1').innerHTML"
style="cursor: ew_resize" onMouseOut="this.style.textDecoration= 'none';">Chapter 1</option>
('welcome').innerHTML=document.getElementById('chapter1').innerHTML"
style="cursor: ew_resize" onMouseOut="this.style.textDecoration= 'none';">Chapter 1</option>
I need it to work in IE too, but may I ask how do I go about with the <option value> thingy? Am I able to use a <div id> code to lead it to display the information needed within the text area?
I do hope the way I described it isn't causing any confusion! Thank you in advance!

Comment