Need to Display Different PDF Based on Date within Milonic Menu

Amelia Kwiatkowski <[email protected]> Fri, 25 Jul 2003 15:12:42 -0400
Newsgroups gmane.comp.web.milonic
Message-ID <A50E3A9E0186D4119F2700508BAEEA3003BD2F25@HRHSNT40>
Chris or anyone else who may be able to help,

I need a way to display one of four lunch menus for our hospital cafeteri=
a
on our Intranet; the menus are in pdf format; I need to base it on the da=
te
which will coincide with a week #. I would like to do this from the Milon=
ic
DHTML menu and currently I have to manually change a file name every Frid=
ay
(cafe_week1.pdf through caf=E9_week4.pdf).

I used the following to display a seasonal graphic on our home page
independent from the DHTML menu.  Do you think I could use something simi=
lar
from within menu_array.js ????

<script>
<!--
<!--Script will display a different seasonal graphic each month-->
var janimg=3D"images/janimg.jpg"
var febimg=3D"images/febimg.jpg"
var marimg=3D"images/marimg.gif"
var aprimg=3D"images/aprimg.jpg"
var mayimg=3D"images/mayimg.jpg"
var junimg=3D"images/junimg.gif"
var julimg=3D"images/julimg.jpg"
var augimg=3D"images/augimg.gif"
var sepimg=3D"images/sepimg.gif"=20
var octimg=3D"images/octimg.jpg"
var novimg=3D"images/novimg.jpg"
var decimg=3D"images/decimg.jpg"
var mydate=3Dnew Date()
var currentmonth=3Dmydate.getMonth()
//document.write(currentmonth)
if (currentmonth=3D=3D0)
document.write('<img src=3D"'+janimg+'">')
else if (currentmonth=3D=3D1)
document.write('<img src=3D"'+febimg+'">')
else if (currentmonth=3D=3D2)
document.write('<img src=3D"'+marimg+'">')
else if (currentmonth=3D=3D3)
document.write('<img src=3D"'+aprimg+'">')
else if (currentmonth=3D=3D4)
document.write('<img src=3D"'+mayimg+'">')
else if (currentmonth=3D=3D5)
document.write('<img src=3D"'+junimg+'">')
else if (currentmonth=3D=3D6)
document.write('<img src=3D"'+julimg+'">')
else if (currentmonth=3D=3D7)
document.write('<img src=3D"'+augimg+'">')
else if (currentmonth=3D=3D8)
document.write('<img src=3D"'+sepimg+'">')
else if (currentmonth=3D=3D9)
document.write('<img src=3D"'+octimg+'">')
else if (currentmonth=3D=3D10)
document.write('<img src=3D"'+novimg+'">')
else if (currentmonth=3D=3D11)
document.write('<img src=3D"'+decimg+'">')
//-->
</script>

Thanks.

Amelia


 -----Original Message-----
From: 	Chris Ulrey [mailto:[email protected]]=20
Sent:	Wednesday, July 09, 2003 3:04 PM
To:	Milonic DHTML Menu
Subject:	RE: [Milonic] target=3D_blank is not quite enough

In the menu_array.js file, create a function:

function openWin()
	{
	WindowName =3D
window.open('path/file.html','WindowName','width=3D450,height=3D200,top=3D=
1,left=3D1
,scrollbars=3Dyes');
	WindowName.focus();
	}

then, instead of putting a url in the menu, do this:

,"New Window Title","javascript:openWin()",,,0

you could also use the function for multiple menu items by passing the ur=
l
through the function parameters like:

function openWin(url)
	{
	WindowName =3D
window.open(url,'WindowName','width=3D450,height=3D200,top=3D1,left=3D1,s=
crollbars=3Dy
es');
	WindowName.focus();
	}

and then:

,"New Window Title","javascript:openWin('path/file.html')",,,0

hope that helps.

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Greg Bussey
Sent: Wednesday, July 09, 2003 11:54 AM
To: [email protected]
Subject: [Milonic] target=3D_blank is not quite enough


OK, I see that I can launch a "popup" window by adding
target=3D_blank to the URL parameter.  However, the new
window comes up with buttonbar, statusbar, menubar,
etc.

What I really need is a new window without all that --
and it would be good to set the size and location, too
-- just like I can do with JavaScript:window.open(url,
name, parameters).  However, the DHTML menu seems to
not be accepting JavaScript in the URL parameter.

Is there a way around this?

Thanks,
Greg

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
Milonic mailing list
[email protected]
http://www.milonic.co.uk/mailman/listinfo/milonic

_______________________________________________
Milonic mailing list
[email protected]
http://www.milonic.co.uk/mailman/listinfo/milonic

CONFIDENTIALITY NOTICE:

This E-Mail is intended only for the use of the individual or entity to w=
hich it is addressed. It may contain information that is privileged and/o=
r confidential, and the use or disclosure of such information may also be=
 restricted under applicable federal and state law. If you received this =
communication in error, please do not distribute any part of it or retain=
 any copies, and delete the original E-Mail. Please notify the sender of =
any error by E-Mail at the electronic address shown.

Thank you for your cooperation.