R
RuthG
I am trying to get a date (using a calendar pop up) from the user and
use that date as a parameter into a SQL Server stored procedure. I
tried using an asp hidden field, with an OnValueChanged procedure in
the code behind file, and an input button which calls the Javascript
calendar pop up and changes the date in the hidden field. The page is
based on a Master page and the fields are in ContentPlaceHolder3. Here
are the two fields:
<asp:HiddenField ID="DelayDate"
runat="server" /><a id="anchor1" name="anchor1"> </a>
<input id="ButtonDelay" name="ButtonDelay"
type="button" value="Delay" runat="server"
onclick = "cal1.select(document.forms
[0].ct100$ContentPlaceHolder3$DelayDate,'anchor1','MM/dd/yyyy');return
false;"
style="font-family:Tw Cen MT Condensed
Extra Bold" />
The calendar javascript cannot locate the input parameter. It gives me
"inputobj undefined", where inputobj is the first argument to the
select function. I tried it three ways:
document.forms[0].DelayDate
document.forms[0].ct100_ContentPlaceHolder3_DelayDate
document.forms[0].ct100$ContentPlaceHolder3$DelayDate
I checked with firebug and there is only one form, the one generated
by asp. The id had the underline and the name the $.
There are also 2 divs, each with a table. The button is in the first
row of the 2nd table. I tried with the hidden field there and also
above the 2nd table, both with _ and $. I got the same error.
use that date as a parameter into a SQL Server stored procedure. I
tried using an asp hidden field, with an OnValueChanged procedure in
the code behind file, and an input button which calls the Javascript
calendar pop up and changes the date in the hidden field. The page is
based on a Master page and the fields are in ContentPlaceHolder3. Here
are the two fields:
<asp:HiddenField ID="DelayDate"
runat="server" /><a id="anchor1" name="anchor1"> </a>
<input id="ButtonDelay" name="ButtonDelay"
type="button" value="Delay" runat="server"
onclick = "cal1.select(document.forms
[0].ct100$ContentPlaceHolder3$DelayDate,'anchor1','MM/dd/yyyy');return
false;"
style="font-family:Tw Cen MT Condensed
Extra Bold" />
The calendar javascript cannot locate the input parameter. It gives me
"inputobj undefined", where inputobj is the first argument to the
select function. I tried it three ways:
document.forms[0].DelayDate
document.forms[0].ct100_ContentPlaceHolder3_DelayDate
document.forms[0].ct100$ContentPlaceHolder3$DelayDate
I checked with firebug and there is only one form, the one generated
by asp. The id had the underline and the name the $.
There are also 2 divs, each with a table. The button is in the first
row of the 2nd table. I tried with the hidden field there and also
above the 2nd table, both with _ and $. I got the same error.