PDA

Click to See Complete Forum and Search --> : Hide select box [Nevermind]


ober0330
May 6th, 2004, 09:58 AM
I have the following: <A HREF="#" onClick="cal1good.select(document.dform.Last_Known,'anchor2','MM/dd/yyyy'); return false;" NAME="anchor2" ID="anchor2">select</A> that calls a dropdown calendar. That works fine, however, when it opens, it falls down over another select box and the select box is on top.

Can I hide the second one temporarily so that the calendar shows as it's supposed to?

ober0330
May 6th, 2004, 10:21 AM
Ok, I've been able to make it hide, but now I can't get it to come back once the user has selected a date:
<input type="text" name="Date_Found" size="12" maxlength="10"> <A HREF="#" onClick="toggleT('h'); cal1df.select(document.dform.Date_Found,'anchor1','MM/dd/yyyy'); return false;" NAME="anchor1" ID="anchor1">select</A>
I figured I could just call the toggle function again after the return, but that doesn't work: <input type="text" name="Date_Found" size="12" maxlength="10"> <A HREF="#" onClick="toggleT('h'); cal1df.select(document.dform.Date_Found,'anchor1','MM/dd/yyyy'); return false;toggleT('s');" NAME="anchor1" ID="anchor1">select</A>

Oh, and here's the toggle function: function toggleT(_h) {
if (document.all) { // is IE
if (_h=='s') eval("document.all.divt1.style.visibility='visible';");
if (_h=='h') eval("document.all.divt1.style.visibility='hidden';");
} else { // is NS?
if (_h=='s') eval("document.layers['"divt1"'].visibility='show';");
if (_h=='h') eval("document.layers['"divt1"'].visibility='hide';");
}
}

Can anyone tell me how to make it visible again after the user selects a date from the javascript calendar?

ober0330
May 6th, 2004, 12:06 PM
Nevermind. I'm repositioning the elements so that the DIV does not open over a select box.