multiple menu script problem

She has: 25 posts

Joined: Sep 2004

I have a script that combines three menus to pull up a single page.
Here it is:

<script LANGUAGE="JavaScript">

</script>

It works great but the actual htm files are in subfolders of the pdf folder. The actual links should be http://ads.butlereagle.com/pdf/2004/11/10/111004.htm
Each month, year and day has it's own folder. I'm not sure how to get the scripts to go to the subfolders since they are always changing depending on the date that is selected. I may just put all of the htm files and images into the pdf folder and be done with it.

Any suggestions?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

It's late and I may screw this up. Sorry if I do. Smiling

Try this:

&lt;script LANGUAGE="JavaScript"&gt;
<!-- Begin
site = "http://ads.butlereagle.com/pdf";
function combineMenus(frm, month, day, year) {
with (frm) {
strmonth = month.options[month.selectedIndex].value;
strday = day.options[day.selectedIndex].value;
stryear = year.options[year.selectedIndex].value;
str = strmonth + strdate + stryear;
url = site + "/" + stryear + "/" + strmonth + "/" + strdate + "/" + str + ".htm";
window.location.href = url;
}
}
// End -->
&lt;/script&gt;
'

In "pdf/2004/11/10", is 11 the month or the day? My version of the code may require some tweaking depending on which way 'round it is.

She has: 25 posts

Joined: Sep 2004

Awesome! It worked great! I tried doing it the way that you did before but I forgot to but the str = part. DOH! Thanks for your help! I appreciate it. Smiling

She has: 25 posts

Joined: Sep 2004

Oh and your code was a little bit messed up - you have strdate instead of strday. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.