multiple menu script problem
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 posted this at 11:39 — 13th November 2004.
He has: 3,348 posts
Joined: Jul 2001
It's late and I may screw this up. Sorry if I do.
Try this:
<script LANGUAGE="JavaScript">
<!-- 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 -->
</script>
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.
dthatsme posted this at 16:08 — 16th November 2004.
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.
dthatsme posted this at 16:09 — 16th November 2004.
She has: 25 posts
Joined: Sep 2004
Oh and your code was a little bit messed up - you have strdate instead of strday.
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.