james henderson
asked on
doPost after textbox change
I am using jsDatePick calendar control to select a date into an asp:textbox control. I need to do a post after the calendar writes the selected date value to the textbox; select the date then do the postback. Any help appreciated.
ASKER
thx for the reply. it's throwing an error: "unexpected method or property access" and it occurs on the creating the calendar object.
this was just for example purposes.
How are you creating your calendar? Also are you using the latest version of the script?
How are you creating your calendar? Also are you using the latest version of the script?
ASKER
i create the calendar just like the example. if the example is incorrect how should I be doing it?
Without seeing your code I can't see if it's done correctly or if something else is going on.
ASKER
here's the code:
<script src="http://prdweb01/TargetManagementMiscLibrary/jquery_datepicker/jsDatePick.min.1.3.js" type="text/javascript"></s cript>
<script type="text/javascript">
window.onload = function () {
new JsDatePick({ useMode: 2, target: "txtDateSCB", dateFormat: "%m/%d/%Y" });
var showConsumer = "<%=mShowConsumer %>";
if (showConsumer == "Y") {
new JsDatePick({ useMode: 2, target: "txtDatRefillDate", dateFormat: "%m/%d/%Y" });
new JsDatePick({ useMode: 2, target: "txtDatDoctorSchedule", dateFormat: "%m/%d/%Y" });
g_calendarObject = new JsDatePick({
useMode:1,
isStripped:true,
target:"txtDatePlanToFillR x",
cellColorScheme:"armygreen "
});
g_calendarObject.setOnSele ctedDelega te(functio n(){
var obj = g_calendarObject.getSelect edDay();
alert("a date was just selected and the date is : " + obj.day + "/" + obj.month + "/" + obj.year);
});
}
};
</script>
the first two jdDatePick calendars work perfectly. the one that is set up from their example is the one that fails when trying to create it.
<script src="http://prdweb01/TargetManagementMiscLibrary/jquery_datepicker/jsDatePick.min.1.3.js" type="text/javascript"></s
<script type="text/javascript">
window.onload = function () {
new JsDatePick({ useMode: 2, target: "txtDateSCB", dateFormat: "%m/%d/%Y" });
var showConsumer = "<%=mShowConsumer %>";
if (showConsumer == "Y") {
new JsDatePick({ useMode: 2, target: "txtDatRefillDate", dateFormat: "%m/%d/%Y" });
new JsDatePick({ useMode: 2, target: "txtDatDoctorSchedule", dateFormat: "%m/%d/%Y" });
g_calendarObject = new JsDatePick({
useMode:1,
isStripped:true,
target:"txtDatePlanToFillR
cellColorScheme:"armygreen
});
g_calendarObject.setOnSele
var obj = g_calendarObject.getSelect
alert("a date was just selected and the date is : " + obj.day + "/" + obj.month + "/" + obj.year);
});
}
};
</script>
the first two jdDatePick calendars work perfectly. the one that is set up from their example is the one that fails when trying to create it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it doesn't work with mode 1 either. i'm giving up on this, but you get the points for trying to help. thx.
Example 3:
g_calendarObject = new JsDatePick({
useMode:1,
isStripped:true,
target:"aFieldId",
cellColorScheme:"armygreen
});
g_calendarObject.setOnSele
var obj = g_calendarObject.getSelect
alert("a date was just selected and the date is : " + obj.day + "/" + obj.month + "/" + obj.year);
});
just use a __DoPostback:
http://aspalliance.com/895_Understanding_the_JavaScript___doPostBack_Function.2