This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C0A0C2.5A29E9D0
Content-Type: text/plain;
        charset="iso-8859-1"

Javascript wiping form values problem:
======================================
.I have a problem with cold fusion causing form values to be wiped when they
are entered with the use of javascript.
.I tried saving the same file as an htm file and the problem did not occur.
.Is there any possible solution.

Here is the code I have used:
=============================
<form action="calendar.asp" name="frm" method="post">
        <input type="text" name="coverdate" value="" size="12"> 
        <a href="javascript:show_calendar('frm.coverdate');"
onmouseover="window.status='Date Picker';return true;"
onmouseout="window.status='';return true;">
                Test Calendar
        </a>
        <BR>
        <input type="submit" value="test">
</form>

I have attached my script to this email.


Any help would be greatly appreciated.

Yours Sincerely,

Kwasi Date-Bah BSc(Hons), MSc, MCP
Systems Developer
Optimad-iMediapoint
[EMAIL PROTECTED]
http://www.iMediapoint.com
office:  020 7598 3060
Mobile:  07801 819336

CONFIDENTIALITY - The information in this e-mail and any attachment is
confidential. It is intended only for the named recipient(s). If you are not
a named recipient please notify the sender immediately, do not disclose the
contents to another person or take copies, and delete immediately.



------_=_NextPart_000_01C0A0C2.5A29E9D0
Content-Type: application/octet-stream;
        name="calendar.cfm"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="calendar.cfm"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
        <script language=3D"Javascript">
                <!-- Original:  Kedar R. Bhave ([EMAIL PROTECTED]) -->
                <!-- Web Site:  http://www.softricks.com -->
        =09
                <!-- This script and many more are available free online at -->
                <!-- The JavaScript Source!! http://javascript.internet.com -->
        =09
                var weekend =3D [0,6];
                var weekendColor =3D "#EEEEEE";
                var fontface =3D "Tahoma, Arial, Helvetica, sans serif";
                var fontsize =3D 2;
        =09
                var gNow =3D new Date();
                var ggWinCal;
                isNav =3D (navigator.appName.indexOf("Netscape") !=3D -1) ? true : =
false;
                isIE =3D (navigator.appName.indexOf("Microsoft") !=3D -1) ? true : =
false;
        =09
                // Non-Leap year Month days..
                Calendar.DOMonth =3D [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, =
31];
                // Leap year Month days..
                Calendar.lDOMonth =3D [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, =
31];
        =09
                Calendar.Months =3D ["January", "February", "March", "April", "May", =
"June",
                "July", "August", "September", "October", "November", "December"];
        =09
                function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
                        if ((p_month =3D=3D null) && (p_year =3D=3D null))      return;
        =09
                        if (p_WinCal =3D=3D null)
                                this.gWinCal =3D ggWinCal;
                        else
                                this.gWinCal =3D p_WinCal;
                =09
                        if (p_month =3D=3D null) {
                                this.gMonthName =3D null;
                                this.gMonth =3D null;
                                this.gYearly =3D true;
                        } else {
                                this.gMonthName =3D Calendar.get_month(p_month);
                                this.gMonth =3D new Number(p_month);
                                this.gYearly =3D false;
                        }
        =09
                        this.gYear =3D p_year;
                        this.gFormat =3D p_format;
                        this.gBGColor =3D "white";
                        this.gFGColor =3D "black";
                        this.gTextColor =3D "black";
                        this.gHeaderColor =3D "black";
                        this.gReturnItem =3D p_item;
                }
        =09
                Calendar.get_daysofmonth =3D Calendar_get_daysofmonth;
                Calendar.get_month =3D Calendar_get_month;
                Calendar.calc_month_year =3D Calendar_calc_month_year;
                Calendar.print =3D Calendar_print;
        =09
                function Calendar_get_daysofmonth(monthNo, p_year) {
                        /*=20
                        Check for leap year ..
                        1.Years evenly divisible by four are normally leap years, 
except =
for...=20
                        2.Years also evenly divisible by 100 are not leap years, 
except =
for...=20
                        3.Years also evenly divisible by 400 are leap years.=20
                        */
                        if ((p_year % 4) =3D=3D 0) {
                                if ((p_year % 100) =3D=3D 0 && (p_year % 400) !=3D 0)
                                        return Calendar.DOMonth[monthNo];
                =09
                                return Calendar.lDOMonth[monthNo];
                        } else
                                return Calendar.DOMonth[monthNo];
                }
        =09
                function Calendar_get_month(monthNo) {
                        return Calendar.Months[monthNo];
                }
        =09
                function Calendar_calc_month_year(p_Month, p_Year, incr) {
                        /*=20
                        Will return an 1-D array with 1st element being the calculated 
month =

                        and second being the calculated year=20
                        after applying the month increment/decrement as specified by 
'incr' =
parameter.
                        'incr' will normally have 1/-1 to navigate thru the months.
                        */
                        var ret_arr =3D new Array();
                =09
                        if (incr =3D=3D -1) {
                                // B A C K W A R D
                                if (p_Month =3D=3D 0) {
                                        ret_arr[0] =3D 11;
                                        ret_arr[1] =3D parseInt(p_Year) - 1;
                                }
                                else {
                                        ret_arr[0] =3D parseInt(p_Month) - 1;
                                        ret_arr[1] =3D parseInt(p_Year);
                                }
                        } else if (incr =3D=3D 1) {
                                // F O R W A R D
                                if (p_Month =3D=3D 11) {
                                        ret_arr[0] =3D 0;
                                        ret_arr[1] =3D parseInt(p_Year) + 1;
                                }
                                else {
                                        ret_arr[0] =3D parseInt(p_Month) + 1;
                                        ret_arr[1] =3D parseInt(p_Year);
                                }
                        }
                =09
                        return ret_arr;
                }
        =09
                function Calendar_print() {
                        ggWinCal.print();
                }
        =09
                function Calendar_calc_month_year(p_Month, p_Year, incr) {
                        /*=20
                        Will return an 1-D array with 1st element being the calculated 
month =

                        and second being the calculated year=20
                        after applying the month increment/decrement as specified by 
'incr' =
parameter.
                        'incr' will normally have 1/-1 to navigate thru the months.
                        */
                        var ret_arr =3D new Array();
                =09
                        if (incr =3D=3D -1) {
                                // B A C K W A R D
                                if (p_Month =3D=3D 0) {
                                        ret_arr[0] =3D 11;
                                        ret_arr[1] =3D parseInt(p_Year) - 1;
                                }
                                else {
                                        ret_arr[0] =3D parseInt(p_Month) - 1;
                                        ret_arr[1] =3D parseInt(p_Year);
                                }
                        } else if (incr =3D=3D 1) {
                                // F O R W A R D
                                if (p_Month =3D=3D 11) {
                                        ret_arr[0] =3D 0;
                                        ret_arr[1] =3D parseInt(p_Year) + 1;
                                }
                                else {
                                        ret_arr[0] =3D parseInt(p_Month) + 1;
                                        ret_arr[1] =3D parseInt(p_Year);
                                }
                        }
                =09
                        return ret_arr;
                }
        =09
                // This is for compatibility with Navigator 3, we have to create and =
discard one object before the prototype object exists.
                new Calendar();
        =09
                Calendar.prototype.getMonthlyCalendarCode =3D function() {
                        var vCode =3D "";
                        var vHeader_Code =3D "";
                        var vData_Code =3D "";
                =09
                        // Begin Table Drawing code here..
                        vCode =3D vCode + "<TABLE width=3D'100%' BORDER=3D1 
BGCOLOR=3D\"" + =
this.gBGColor + "\" bordercolor=3D'#CCCCCC' CELLSPACING=3D0 =
CELLPADDING=3D1>";
                =09
                        vHeader_Code =3D this.cal_header();
                        vData_Code =3D this.cal_data();
                        vCode =3D vCode + vHeader_Code + vData_Code;
                =09
                        vCode =3D vCode + "</TABLE>";
                =09
                        return vCode;
                }
        =09
                Calendar.prototype.show =3D function() {
                        var vCode =3D "";
                =09
                        this.gWinCal.document.open();
        =09
                        // Setup the page...
                        this.wwrite("<html>");
                        this.wwrite("<head><title>Calendar</title>");
                        this.wwrite("<link rel=3D'stylesheet' =
href=3D'../css/default.css'>");
                        this.wwrite("</head>");
        =09
                        this.wwrite("<body " +=20
                                "link=3D\"" + this.gLinkColor + "\" " +=20
                                "vlink=3D\"" + this.gLinkColor + "\" " +
                                "alink=3D\"" + this.gLinkColor + "\" " +
                                "text=3D\"" + this.gTextColor + "\">");
                        this.wwriteA("<span class=3D'title'><B>");
                        this.wwriteA(this.gMonthName + " " + this.gYear);
                        this.wwriteA("</B></span><BR>");
        =09
                        // Show navigation buttons
                        var prevMMYYYY =3D Calendar.calc_month_year(this.gMonth, 
this.gYear, =
-1);
                        var prevMM =3D prevMMYYYY[0];
                        var prevYYYY =3D prevMMYYYY[1];
        =09
                        var nextMMYYYY =3D Calendar.calc_month_year(this.gMonth, 
this.gYear, =
1);
                        var nextMM =3D nextMMYYYY[0];
                        var nextYYYY =3D nextMMYYYY[1];
                =09
                        this.wwrite("<TABLE WIDTH=3D'100%' BORDER=3D0 CELLSPACING=3D0 =
CELLPADDING=3D1 BGCOLOR=3D'#FFB034'><TR><TD ALIGN=3Dcenter =
valign=3Dmiddle>");
                        this.wwrite("<A class=3D'whiteroll' HREF=3D\"" +
                                "javascript:window.opener.Build(" +=20
                                "'" + this.gReturnItem + "', '" + this.gMonth + "', '" 
+ =
(parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" +
                                ");" +
                                "\"><img src=3D'../images/arrow_left.gif' width=3D'4' 
height=3D'8' =
border=3D'0'><img src=3D'../images/arrow_left.gif' width=3D'4' =
height=3D'8' border=3D'0'> Year<\/A></TD><TD ALIGN=3Dcenter>");
                        this.wwrite("<A class=3D'whiteroll' HREF=3D\"" +
                                "javascript:window.opener.Build(" +=20
                                "'" + this.gReturnItem + "', '" + prevMM + "', '" + 
prevYYYY + "', =
'" + this.gFormat + "'" +
                                ");" +
                                "\"><img src=3D'../images/arrow_left.gif' width=3D'4' 
height=3D'8' =
border=3D'0'> Month<\/A></TD><TD ALIGN=3Dcenter>");
                        this.wwrite("<A class=3D'whiteroll' =
HREF=3D\"javascript:window.print();\">Print</A></TD><TD =
ALIGN=3Dcenter>");
                        this.wwrite("<A class=3D'whiteroll' HREF=3D\"" +
                                "javascript:window.opener.Build(" +=20
                                "'" + this.gReturnItem + "', '" + nextMM + "', '" + 
nextYYYY + "', =
'" + this.gFormat + "'" +
                                ");" +
                                "\">Month <img src=3D'../images/arrow_right.gif' 
width=3D'4' =
height=3D'8' border=3D'0'><\/A></TD><TD ALIGN=3Dcenter>");
                        this.wwrite("<A class=3D'whiteroll' HREF=3D\"" +
                                "javascript:window.opener.Build(" +=20
                                "'" + this.gReturnItem + "', '" + this.gMonth + "', '" 
+ =
(parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" +
                                ");" +
                                "\">Year <img src=3D'../images/arrow_right.gif' 
width=3D'4' =
height=3D'8' border=3D'0'><img src=3D'../images/arrow_right.gif' =
width=3D'4' height=3D'8' border=3D'0'><\/A></TD></TR></TABLE><BR>");
        =09
                        // Get the complete calendar code for the month..
                        vCode =3D this.getMonthlyCalendarCode();
                        this.wwrite(vCode);
        =09
                        this.wwrite("</font></body></html>");
                        this.gWinCal.document.close();
                }
        =09
                Calendar.prototype.showY =3D function() {
                        var vCode =3D "";
                        var i;
                        var vr, vc, vx, vy;             // Row, Column, X-coord, 
Y-coord
                        var vxf =3D 285;                        // X-Factor
                        var vyf =3D 200;                        // Y-Factor
                        var vxm =3D 10;                 // X-margin
                        var vym;                                // Y-margin
                        if (isIE)       vym =3D 75;
                        else if (isNav) vym =3D 25;
                =09
                        this.gWinCal.document.open();
        =09
                        this.wwrite("<html>");
                        this.wwrite("<head><title>Calendar</title>");
                        this.wwrite("<style type=3D'text/css'>\n<!--");
                        for (i=3D0; i<12; i++) {
                                vc =3D i % 3;
                                if (i>=3D0 && i<=3D 2)  vr =3D 0;
                                if (i>=3D3 && i<=3D 5)  vr =3D 1;
                                if (i>=3D6 && i<=3D 8)  vr =3D 2;
                                if (i>=3D9 && i<=3D 11) vr =3D 3;
                        =09
                                vx =3D parseInt(vxf * vc) + vxm;
                                vy =3D parseInt(vyf * vr) + vym;
        =09
                                this.wwrite(".lclass" + i + " {position:absolute;top:" 
+ vy + =
";left:" + vx + ";}");
                        }
                        this.wwrite("-->\n</style>");
                        this.wwrite("</head>");
        =09
                        this.wwrite("<body " +=20
                                "link=3D\"" + this.gLinkColor + "\" " +=20
                                "vlink=3D\"" + this.gLinkColor + "\" " +
                                "alink=3D\"" + this.gLinkColor + "\" " +
                                "text=3D\"" + this.gTextColor + "\">");
                        this.wwrite("<B><span class=3D'boldtext'>");
                        this.wwrite("Year : " + this.gYear);
                        this.wwrite("</span></B><BR>");
        =09
                        // Show navigation buttons
                        var prevYYYY =3D parseInt(this.gYear) - 1;
                        var nextYYYY =3D parseInt(this.gYear) + 1;
                =09
                        this.wwrite("<TABLE WIDTH=3D'100%' BORDER=3D1 CELLSPACING=3D0 =
CELLPADDING=3D0 BGCOLOR=3D'#CCCCCC'><TR><TD ALIGN=3Dcenter>");
                        this.wwrite("[<A HREF=3D\"" +
                                "javascript:window.opener.Build(" +=20
                                "'" + this.gReturnItem + "', null, '" + prevYYYY + "', 
'" + =
this.gFormat + "'" +
                                ");" +
                                "\" alt=3D'Prev Year'><<<\/A>]</TD><TD 
ALIGN=3Dcenter>");
                        this.wwrite("[<A =
HREF=3D\"javascript:window.print();\">Print</A>]</TD><TD =
ALIGN=3Dcenter>");
                        this.wwrite("[<A HREF=3D\"" +
                                "javascript:window.opener.Build(" +=20
                                "'" + this.gReturnItem + "', null, '" + nextYYYY + "', 
'" + =
this.gFormat + "'" +
                                ");" +
                                "\">>><\/A>]</TD></TR></TABLE><BR>");
        =09
                        // Get the complete calendar code for each month..
                        var j;
                        for (i=3D11; i>=3D0; i--) {
                                if (isIE)
                                        this.wwrite("<DIV ID=3D\"layer" + i + "\" 
CLASS=3D\"lclass" + i + =
"\">");
                                else if (isNav)
                                        this.wwrite("<LAYER ID=3D\"layer" + i + "\" 
CLASS=3D\"lclass" + i =
+ "\">");
        =09
                                this.gMonth =3D i;
                                this.gMonthName =3D Calendar.get_month(this.gMonth);
                                vCode =3D this.getMonthlyCalendarCode();
                                this.wwrite(this.gMonthName + "/" + this.gYear + 
"<BR>");
                                this.wwrite(vCode);
        =09
                                if (isIE)
                                        this.wwrite("</DIV>");
                                else if (isNav)
                                        this.wwrite("</LAYER>");
                        }
        =09
                        this.wwrite("</font><BR></body></html>");
                        this.gWinCal.document.close();
                }
        =09
                Calendar.prototype.wwrite =3D function(wtext) {
                        this.gWinCal.document.writeln(wtext);
                }
        =09
                Calendar.prototype.wwriteA =3D function(wtext) {
                        this.gWinCal.document.write(wtext);
                }
        =09
                Calendar.prototype.cal_header =3D function() {
                        var vCode =3D "";
                =09
                        vCode =3D vCode + "<TR>";
                        vCode =3D vCode + "<TD WIDTH=3D'14%'><b><span =
class=3D'boldtext'>Sun</span></b></TD>";
                        vCode =3D vCode + "<TD WIDTH=3D'14%'><b><span =
class=3D'boldtext'>Mon</span></B></TD>";
                        vCode =3D vCode + "<TD WIDTH=3D'14%'><b><span =
class=3D'boldtext'>Tue</span></B></TD>";
                        vCode =3D vCode + "<TD WIDTH=3D'14%'><b><span =
class=3D'boldtext'>Wed</span></B></TD>";
                        vCode =3D vCode + "<TD WIDTH=3D'14%'><B><span =
class=3D'boldtext'>Thu</span></B></TD>";
                        vCode =3D vCode + "<TD WIDTH=3D'14%'><B><span =
class=3D'boldtext'>Fri</span></B></TD>";
                        vCode =3D vCode + "<TD WIDTH=3D'16%'><B><span =
class=3D'boldtext'>Sat</span></B></TD>";
                        vCode =3D vCode + "</TR>";
                =09
                        return vCode;
                }
        =09
                Calendar.prototype.cal_data =3D function() {
                        var vDate =3D new Date();
                        vDate.setDate(1);
                        vDate.setMonth(this.gMonth);
                        vDate.setFullYear(this.gYear);
        =09
                        var vFirstDay=3DvDate.getDay();
                        var vDay=3D1;
                        var vLastDay=3DCalendar.get_daysofmonth(this.gMonth, 
this.gYear);
                        var vOnLastDay=3D0;
                        var vCode =3D "";
        =09
                        /*
                        Get day for the 1st of the requested month/year..
                        Place as many blank cells before the 1st day of the month as =
necessary.=20
                        */
        =09
                        vCode =3D vCode + "<TR>";
                        for (i=3D0; i<vFirstDay; i++) {
                                vCode =3D vCode + "<TD WIDTH=3D'14%'" + =
this.write_weekend_string(i) + ">&nbsp;</TD>";
                        }
        =09
                        // Write rest of the 1st week
                        for (j=3DvFirstDay; j<7; j++) {
                                vCode =3D vCode + "<TD WIDTH=3D'14%'" + =
this.write_weekend_string(j) + ">" +=20
                                        "<A HREF=3D'#' " +=20
                                                "onClick=3D\"self.opener.document." + 
this.gReturnItem + =
".value=3D'" +=20
                                                this.format_data(vDay) +=20
                                                "';window.close();\">" +=20
                                                this.format_day(vDay) +=20
                                        "</A>" +=20
                                        "</TD>";
                                vDay=3DvDay + 1;
                        }
                        vCode =3D vCode + "</TR>";
        =09
                        // Write the rest of the weeks
                        for (k=3D2; k<7; k++) {
                                vCode =3D vCode + "<TR>";
        =09
                                for (j=3D0; j<7; j++) {
                                        vCode =3D vCode + "<TD WIDTH=3D'14%'" + =
this.write_weekend_string(j) + ">" +=20
                                                "<A HREF=3D'#' " +=20
                                                        
"onClick=3D\"self.opener.document." + this.gReturnItem + =
".value=3D'" +=20
                                                        this.format_data(vDay) +=20
                                                        "';window.close();\">" +=20
                                                this.format_day(vDay) +=20
                                                "</A>" +=20
                                                "</TD>";
                                        vDay=3DvDay + 1;
        =09
                                        if (vDay > vLastDay) {
                                                vOnLastDay =3D 1;
                                                break;
                                        }
                                }
        =09
                                if (j =3D=3D 6)
                                        vCode =3D vCode + "</TR>";
                                if (vOnLastDay =3D=3D 1)
                                        break;
                        }
                =09
                        // Fill up the rest of last week with proper blanks, so that 
we get =
proper square blocks
                        for (m=3D1; m<(7-j); m++) {
                                if (this.gYearly)
                                        vCode =3D vCode + "<TD WIDTH=3D'14%'" + =
this.write_weekend_string(j+m) +=20
                                        "><FONT COLOR=3D'#CCCCCC'>&nbsp;</FONT></TD>";
                                else
                                        vCode =3D vCode + "<TD WIDTH=3D'14%'" + =
this.write_weekend_string(j+m) +=20
                                        "><FONT COLOR=3D'#CCCCCC'>" + m + 
"</FONT></TD>";
                        }
                =09
                        return vCode;
                }
        =09
                Calendar.prototype.format_day =3D function(vday) {
                        var vNowDay =3D gNow.getDate();
                        var vNowMonth =3D gNow.getMonth();
                        var vNowYear =3D gNow.getFullYear();
        =09
                        if (vday =3D=3D vNowDay && this.gMonth =3D=3D vNowMonth && =
this.gYear =3D=3D vNowYear)
                                return ("<span class=3D'boldtext'><FONT 
COLOR=3D\"RED\"><B>" + vday =
+ "</B></FONT></span>");
                        else
                                return (vday);
                }
        =09
                Calendar.prototype.write_weekend_string =3D function(vday) {
                        var i;
        =09
                        // Return special formatting for the weekend day.
                        for (i=3D0; i<weekend.length; i++) {
                                if (vday =3D=3D weekend[i])
                                        return (" BGCOLOR=3D\"" + weekendColor + "\"");
                        }
                =09
                        return "";
                }
        =09
                Calendar.prototype.format_data =3D function(p_day) {
                        var vData;
                        var vMonth =3D 1 + this.gMonth;
                        vMonth =3D (vMonth.toString().length < 2) ? "0" + vMonth : 
vMonth;
                        var vMon =3D =
Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();
                        var vFMon =3D Calendar.get_month(this.gMonth).toUpperCase();
                        var vY4 =3D new String(this.gYear);
                        var vY2 =3D new String(this.gYear.substr(2,2));
                        var vDD =3D (p_day.toString().length < 2) ? "0" + p_day : 
p_day;
        =09
                        switch (this.gFormat) {
        =09
                                case "DD\/MON\/YYYY" :
                                        vData =3D vDD + "\/" + vMon + "\/" + vY4;
                                        break;
                                case "DD\/MON\/YY" :
                                        vData =3D vDD + "\/" + vMon + "\/" + vY2;
                                        break;
                                case "DD-MON-YYYY" :
                                        vData =3D vDD + "-" + vMon + "-" + vY4;
                                        break;
                                case "DD-MON-YY" :
                                        vData =3D vDD + "-" + vMon + "-" + vY2;
                                        break;
        =09
                                case "MM\/DD\/YYYY" :
                                        vData =3D vMonth + "\/" + vDD + "\/" + vY4;
                                        break;
                                case "MM\/DD\/YY" :
                                        vData =3D vMonth + "\/" + vDD + "\/" + vY2;
                                        break;
                                case "MM-DD-YYYY" :
                                        vData =3D vMonth + "-" + vDD + "-" + vY4;
                                        break;
                                case "MM-DD-YY" :
                                        vData =3D vMonth + "-" + vDD + "-" + vY2;
                                        break;
        =09
                                case "DD\/MONTH\/YYYY" :
                                        vData =3D vDD + "\/" + vFMon + "\/" + vY4;
                                        break;
                                case "DD\/MONTH\/YY" :
                                        vData =3D vDD + "\/" + vFMon + "\/" + vY2;
                                        break;
                                case "DD-MONTH-YYYY" :
                                        vData =3D vDD + "-" + vFMon + "-" + vY4;
                                        break;
                                case "DD-MONTH-YY" :
                                        vData =3D vDD + "-" + vFMon + "-" + vY2;
                                        break;
        =09
                                case "DD\/MM\/YYYY" :
                                        vData =3D vDD + "\/" + vMonth + "\/" + vY4;
                                        break;
                                case "DD\/MM\/YY" :
                                        vData =3D vDD + "\/" + vMonth + "\/" + vY2;
                                        break;
                                case "DD-MM-YYYY" :
                                        vData =3D vDD + "-" + vMonth + "-" + vY4;
                                        break;
                                case "DD-MM-YY" :
                                        vData =3D vDD + "-" + vMonth + "-" + vY2;
                                        break;
        =09
                                default :
                                        vData =3D vDD + "." + vMonth + "." + vY4;
                        }
        =09
                        return vData;
                }
        =09
                function Build(p_item, p_month, p_year, p_format) {
                        var p_WinCal =3D ggWinCal;
                        gCal =3D new Calendar(p_item, p_WinCal, p_month, p_year, 
p_format);
        =09
                        // Customize your Calendar here..
                        gCal.gBGColor=3D"#FFFFFF";
                        gCal.gLinkColor=3D"#000000";
                        gCal.gTextColor=3D"#000000";
                        gCal.gHeaderColor=3D"#000000";
        =09
                        // Choose appropriate show function
                        if (gCal.gYearly)       gCal.showY();
                        else    gCal.show();
                }
        =09
                function show_calendar() {
                        /*=20
                                p_month : 0-11 for Jan-Dec; 12 for All Months.
                                p_year  : 4-digit year
                                p_format: Date format (dd.mm.yyyy, dd.mm.yy, ...)
                                p_item  : Return Item.
                        */
        =09
                        p_item =3D arguments[0];
                        if (arguments[1] =3D=3D null)
                                p_month =3D new String(gNow.getMonth());
                        else
                                p_month =3D arguments[1];
                        if (arguments[2] =3D=3D "" || arguments[2] =3D=3D null)
                                p_year =3D new String(gNow.getFullYear().toString());
                        else
                                p_year =3D arguments[2];
                        if (arguments[3] =3D=3D null)
                                p_format =3D "DD.MM.YYYY";
                        else
                                p_format =3D arguments[3];
        =09
                        vWinCal =3D window.open("", "Calendar",=20
                                =
"width=3D250,height=3D250,status=3Dno,resizable=3Dno,top=3D200,left=3D20=
0");
                        vWinCal.opener =3D self;
                        ggWinCal =3D vWinCal;
        =09
                        Build(p_item, p_month, p_year, p_format);
                }
                /*
                Yearly Calendar Code Starts here
                */
                function show_yearly_calendar(p_item, p_year, p_format) {
                        // Load the defaults..
                        if (p_year =3D=3D null || p_year =3D=3D "")
                                p_year =3D new String(gNow.getFullYear().toString());
                        if (p_format =3D=3D null || p_format =3D=3D "")
                                p_format =3D "DD.MM.YYYY";
        =09
                        var vWinCal =3D window.open("", "Calendar", 
"scrollbars=3Dyes");
                        vWinCal.opener =3D self;
                        ggWinCal =3D vWinCal;
        =09
                        Build(p_item, null, p_year, p_format);
                }
        </script>
</head>

<body>

<form action=3D"calendar.asp" name=3D"frm" method=3D"post">
        <input type=3D"text" name=3D"coverdate" value=3D"" size=3D"12">=09
        <a href=3D"javascript:show_calendar('frm.coverdate');" =
onmouseover=3D"window.status=3D'Date Picker';return true;" =
onmouseout=3D"window.status=3D'';return true;">
                Test Calendar
        </a>
        <BR>
        <input type=3D"submit" value=3D"test">
</form>

</body>
</html>

------_=_NextPart_000_01C0A0C2.5A29E9D0
Content-Type: application/octet-stream;
        name="calendar.asp"
Content-Disposition: attachment;
        filename="calendar.asp"

<% =Now ()%>

<% Response.Write("<BR>") %>

<% Response.Write("<b>hello</b>") %>

------_=_NextPart_000_01C0A0C2.5A29E9D0--

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to