Hi
This should toggle the element visibility passed to the function
function toggleElement(sElementID){
if(document.getElementById)
{
var e = document.getElementById(sElementId);
if( e != null ) e.style.visibility = ( e.style.visibility == "hidden") ?
"visible" : "hidden";
}
}
MyButton.Attributes.Add("onclick","toggleElement(' ELEMENTID')" );
Where ELEMENTID is the calendar in your case
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Jim Owen" <jk********@comcast.net> wrote in message
news:On**************@TK2MSFTNGP10.phx.gbl...
I never ever need to use Javascript, but in this case I think I do. All I
want is for a Calendar control to appear when the user clicks a button.
Being as this isn't worth a trip to the server, I want to add some JS to
make this happen. What is the script for that? I tried:
MyButton.Attributes.Add("onclick","document.forms[0].MyCalendar.Visible='Tru e';");
Though of course I don't know what I'm doing.
--
- Jim Owen
206-501-6936