/    Sign up×
Community /Pin to ProfileBookmark

Java Script code help

Hi,

Im new to java codes and Im building a Web page on Tripod and would like to put multiple drop down menu’s on the page. I have no clue what so ever on what to do. This is the code that I would like to use.

<form name=”a294″ >
<select name=”a969″ size=”1″ style=”background-color:#FFFFD7″ onChange=”displaydesc(document.a294.a969.selectedIndex)”>
<option selected value=”http://wsabstract.com”>Website Abstraction </option>
<option value=”http://freewarejava.com”>Freewarejava.com</option>
<option value=”http://wired.com”>Wired News</option>
<option value=”http://freewarejava.com/cgi-bin/Ultimate.cgi”>WA Help Forum</option>
<option value=”http://www.msnbc.com”>MSNBC</option>
</select>
<input type=”button” value=”Go”
onClick=”location=document.a294.a969.options[document.a294.a969.selectedIndex].value”><br>
<span id=”descriptions” align=”left” style=”font:italic 13px Arial”>
</span>
</form>

<script>

//Drop down menu w/ description- © Dynamic Drive ([url]www.dynamicdrive.com[/url])
//For full source code, 100’s more DHTML scripts, and TOS,
//visit [url]http://www.dynamicdrive.com[/url]

//CUSTOMIZE TEXT DESCRIPTIONS FOR LINKS ABOVE
var textdisplay=new Array()
textdisplay[0]=”Comprehensive JavaScript tutorials and over 400+ free scripts”
textdisplay[1]=”Direct link to hundreds of free Java applets online!”
textdisplay[2]=”Up to date news on the technology front”
textdisplay[3]=”Interact with other webmasters on JavaScript, DHTML, and more.”
textdisplay[4]=”National and international news”

function displaydesc(which){
if (document.all)
descriptions.innerHTML=textdisplay[which]
else if (document.getElementById)
document.getElementById(“descriptions”).innerHTML=textdisplay[which]
}

displaydesc(document.a294.a969.selectedIndex)

document.a294.a969.options[0].selected=true

</script>

Remember Im just a rookie and would appreciate any editing to this solution.?

Thanks,
Hardyhar

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@CharlesFeb 13.2003 — [font=georgia]I need a little bit more information. JavaScript will fail one in ten times so you will need a JavaScript free, backup navigation for this. What do you want to happen for the JavaScript free? And I need a list of the option texts and their associated URLs[/font]
×

Success!

Help @Hardyhar spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...