Java menu stuff

admin

Administrator
Staff member
I have two questions concerning the "Combined menu script" that I found on this site... hope you guys can help me!

Can I create a third menu that also affects the link which is generated?

example: if I have a menu in which you select a "car brand", and another in which you select "year produced"; I could end up with a link to Toyota1993.htm
But I want another factor; for example: "Color". So a link could end up with Toyota1993red.htm

Hope that made sense!

My other question concerns spicing up the menu's themselves... Can I change the look from the boring gray/white standard? Cause' I can't figure out how without ruining the above-mentioned script!

here's the script, btw, if that makes it easier on you guys:
(Thanks in advance!)

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore, Editor -->
<!-- Idea by: Selvi Narayanan -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! <!-- m --><a class="postlink" href="http://javascript.internet.com">http://javascript.internet.com</a><!-- m --> -->

<!-- Begin
site = "http://www.yoursite.com"; // Do not include the final "/"
function combineMenus(frm, menu1, menu2) {
with (frm) {
str = menu1.options[menu1.selectedIndex].value;
str += menu2.options[menu2.selectedIndex].value;
url = site + "/" + str + ".html";
window.location.href = url;
}
}
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<center>
<form name=menufrm>
<select name=menu1>
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">Make</option>
<option value="Ford">Ford</option>
<option value="Chevy">Chevy</option>
<option value="Toyota">Toyota</option>
</select>

<select name=menu2>
<option value="">Year</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
</select>

<input type=button value="Select" onClick="combineMenus(this.form, this.form.menu1, this.form.menu2)">
</form>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
 
Back
Top