•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 397,795 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,391 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 2084 | Replies: 1
![]() |
•
•
Join Date: Jul 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Good afternoon:
As before, i use pop out calendar for DOB field, but is not so good for user to access. So my lecturer request maintain pop out calendar but add a method that can type the birth date on the text field according to user's choice.How can i use 2 method together for my DOB field? Thank you for answering.
Here is the code for DOB field at the moment..
[ASP]
<td width="40%"> <input type="text" name="txtDate2" size="10" value="<%=DisplayDate(RsMember2("dtDOB"))%>" readonly>
<img border="0" src="Images/calendar.gif" width="19" height="19" onclick="javascript:show_calendar('frmUpdate.txtDate2');"></td>[ASP]
[JAVASCRIPT]
var weekend = [0,6];
var weekendColor = "#e0e0e0";
var fontface = "Verdana";
var fontsize = 2;
var gNow = new Date();
var ggWinCal;
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
Calendar.Months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];
// Non-Leap year Month days..
Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Leap year Month days..
Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
if ((p_month == null) && (p_year == null)) return;
if (p_WinCal == null)
this.gWinCal = ggWinCal;
else
this.gWinCal = p_WinCal;
if (p_month == null) {
this.gMonthName = null;
this.gMonth = null;
this.gYearly = true;
} else {
this.gMonthName = Calendar.get_month(p_month);
this.gMonth = new Number(p_month);
this.gYearly = false;
}
this.gYear = p_year;
this.gFormat = p_format;
this.gBGColor = "white";
this.gFGColor = "black";
this.gTextColor = "black";
this.gHeaderColor = "black";
this.gReturnItem = p_item;
}
Calendar.get_month = Calendar_get_month;
Calendar.get_daysofmonth = Calendar_get_daysofmonth;
Calendar.calc_month_year = Calendar_calc_month_year;
Calendar.print = Calendar_print;
[/JAVASCRIPT]
too long to finish...so i jz copy partly...
As before, i use pop out calendar for DOB field, but is not so good for user to access. So my lecturer request maintain pop out calendar but add a method that can type the birth date on the text field according to user's choice.How can i use 2 method together for my DOB field? Thank you for answering.
Here is the code for DOB field at the moment..
[ASP]
<td width="40%"> <input type="text" name="txtDate2" size="10" value="<%=DisplayDate(RsMember2("dtDOB"))%>" readonly>
<img border="0" src="Images/calendar.gif" width="19" height="19" onclick="javascript:show_calendar('frmUpdate.txtDate2');"></td>[ASP]
[JAVASCRIPT]
var weekend = [0,6];
var weekendColor = "#e0e0e0";
var fontface = "Verdana";
var fontsize = 2;
var gNow = new Date();
var ggWinCal;
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
Calendar.Months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];
// Non-Leap year Month days..
Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Leap year Month days..
Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
if ((p_month == null) && (p_year == null)) return;
if (p_WinCal == null)
this.gWinCal = ggWinCal;
else
this.gWinCal = p_WinCal;
if (p_month == null) {
this.gMonthName = null;
this.gMonth = null;
this.gYearly = true;
} else {
this.gMonthName = Calendar.get_month(p_month);
this.gMonth = new Number(p_month);
this.gYearly = false;
}
this.gYear = p_year;
this.gFormat = p_format;
this.gBGColor = "white";
this.gFGColor = "black";
this.gTextColor = "black";
this.gHeaderColor = "black";
this.gReturnItem = p_item;
}
Calendar.get_month = Calendar_get_month;
Calendar.get_daysofmonth = Calendar_get_daysofmonth;
Calendar.calc_month_year = Calendar_calc_month_year;
Calendar.print = Calendar_print;
[/JAVASCRIPT]
too long to finish...so i jz copy partly...
•
•
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 166
Reputation:
Rep Power: 5
Solved Threads: 7
Take the readonly attribute off of the text input. This will allow your users to type in the text field. You will need to add extra validation to that field to ensure the data they enter is in a valid date format.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
- Text field does not enable on refresh (JavaScript / DHTML / AJAX)
- JSP and Servlet Display of text in a text field (JSP)
- Select Box populates text field (JavaScript / DHTML / AJAX)
- Filtering My sql through Php using drop down menu and text field (PHP)
- getting the text field value (HTML and CSS)
- Date of Birth field need help (ASP.NET)
- Output MySQL text field formatted (PHP)
- sending the number of rows...... (HTML and CSS)
Other Threads in the ASP Forum
- Previous Thread: Problem in COM for ASP in windows 2003
- Next Thread: trim function


Linear Mode