CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 ASP-Popup Calendar

Print topic Send  topic

Author Message
Ken Hardwick
Posted: 07/09/2001, 10:57 AM

Ok...I've tried figure how to get one to work but just have not been
successfull.

I have a asp/html record page with a date field. I would like to modify
the cc generated file with a calendar popup. I have been able to get
several different java popup calendar to popup but I when I select a
date from the popup..nothing happens.

If anyone has a very small application that was originally generated by cc
and then modified to use a popup calendar,
I would appreciate receiving the set of application files so that I can see
how it works...I am working with ASP output.

I am extremely frustrated in trying to get this to work and would apprecate
any help.

Thanks in advance,

KenHardwick@www.com





Jim Ryan
Posted: 07/10/2001, 6:14 PM

Hi Ken,

Try this link http://www.clearviewdesign.com/NEWBIE.asp . It shows the
source code in ASP. This may help. Good luck.


Jim





"Ken Hardwick" <kenhardwick@visto.com> wrote in message
news:9icrac$poa$1@news.codecharge.com...
> Ok...I've tried figure how to get one to work but just have not been
> successfull.
>
> I have a asp/html record page with a date field. I would like to modify
> the cc generated file with a calendar popup. I have been able to get
> several different java popup calendar to popup but I when I select a
> date from the popup..nothing happens.
>
> If anyone has a very small application that was originally generated by cc
> and then modified to use a popup calendar,
> I would appreciate receiving the set of application files so that I can
see
> how it works...I am working with ASP output.
>
> I am extremely frustrated in trying to get this to work and would
apprecate
> any help.
>
> Thanks in advance,
>
>KenHardwick@www.com
>
>
>
>
>
>

David A. Lee
Posted: 07/10/2001, 6:44 PM

Now This is the best HTML 'thingy' I have seen in YEARS !!!
Totally blows away a COM object because it doesnt require
COM or ASP or any nonsense, just pure HTML and javascript !
I'm going to use this on my site for sure ! (yes I'll keep the copyright !)

--------------------------------------------------
David A. Lee
Dal Enterprises Inc.
dave@calldei.com
http://www.calldei.com


"Jim Ryan" <jryan@stratos.net> wrote in message
news:9ig999$h6p$1@news.codecharge.com...
> Hi Ken,
>
> Try this link http://www.clearviewdesign.com/NEWBIE.asp . It shows the
> source code in ASP. This may help. Good luck.
>
>
> Jim
>
>
>
>
>
> "Ken Hardwick" <kenhardwick@visto.com> wrote in message
>news:9icrac$poa$1@news.codecharge.com...
> > Ok...I've tried figure how to get one to work but just have not been
> > successfull.
> >
> > I have a asp/html record page with a date field. I would like to modify
> > the cc generated file with a calendar popup. I have been able to get
> > several different java popup calendar to popup but I when I select a
> > date from the popup..nothing happens.
> >
> > If anyone has a very small application that was originally generated by
cc
> > and then modified to use a popup calendar,
> > I would appreciate receiving the set of application files so that I can
> see
> > how it works...I am working with ASP output.
> >
> > I am extremely frustrated in trying to get this to work and would
> apprecate
> > any help.
> >
> > Thanks in advance,
> >
> >KenHardwick@www.com
> >
> >
> >
> >
> >
> >
>
>

Ken Hardwick
Posted: 07/11/2001, 2:05 AM


Ok...now..I have a popupcalendar.html which looks,but how do I incorporate
it into the generated files that is created by CC.

For instance, I generated a ASP page (default.asp) and a html
page`(default.html) with a date field..start_date...which of these two file
do
I modify and with what to get the popup to show and then enter the selected
date to the text box.

Ken

Below is extract of these two files...


default.html
<html>
<head>
<title>Projects</title>
<meta name="GENERATOR" content="YesSoftware CodeCharge v.1.2.0 /
Templates.ccp build 5/9/2001">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"></head>
<body >
{Header}
<table>
<tr>
<td valign="top">
<!--BeginFormMenu-->
<form method="POST" action="{FileName}" name="Menu">
<table >
<!--BeginMenuError-->
<tr>
<td colspan="2"><font >{sMenuErr}<font></td>
</tr>
<!--EndMenuError-->

<tr>
<td ><font >Start_Date</font></td>
<td ><input type="text" name="Start_Date" maxlength="10"
value="{Start_Date}" size=""></td>
</tr>

<tr>
<td colspan="2" align="right">

<!-- *** Buttons *** -->

<!--BeginMenuInsert-->
<input type="hidden" value="insert" name="FormAction">
<input type="submit" value="Insert"
onclick="document.Menu.FormAction.value = 'insert';">
<!--EndMenuInsert-->

<!--BeginMenuEdit-->
<input type="hidden" value="update" name="FormAction"/>

<!--BeginMenuUpdate-->
<input type="submit" value="Update"
onclick="document.Menu.FormAction.value = 'update';"/>
<!--EndMenuUpdate-->

<!--EndMenuDelete-->
<input type="submit" value="Delete"
onclick="document.Menu.FormAction.value = 'delete';"/>
<!--EndMenuDelete-->

<!--EndMenuEdit-->

<!--BeginMenuCancel-->
<input type="submit" value="Cancel"
onclick="document.Menu.FormAction.value = 'cancel';"/>
<!--EndMenuCancel-->

<input type="hidden" name="FormName" value="Menu"/>

<input type="hidden" name="PK_Start_Date" value="{PK_Start_Date}"/>
</td>
</tr>
</table>
</form>
<!--EndFormMenu-->

</td>
</tr>
</table>


{Footer}

</body>
</html>











Default.asp

<!-- #INCLUDE FILE="Common.asp" -->

<%
'
' Filename: Default.asp
' Generated with CodeCharge 1.2.0
' ASPTemplates.ccp build 5/9/2001
'


sFileName = "Default.asp"
sTemplateFileName = "Default.html"


' Default Open Event start
' Default Open Event end


' Default PageSecurity begin

' Default PageSecurity end

' Default OpenAnyPage Event start
' Default OpenAnyPage Event end


LoadTemplate sAppPath & sTemplateFileName, "main"



SetVar "FileName", sFileName


sMenuErr = ""

sAction = GetParam("FormAction")
sForm = GetParam("FormName")
Select Case sForm
Case "Menu"
MenuAction(sAction)
end select

Menu_Show
Parse "main", False
Response.write PrintVar("main")

' Default Close Event start
' Default Close Event end


'--------------------------------------------------


Sub MenuAction(sAction)
dim bExecSQL: bExecSQL = true

' Menu Action begin
sActionFileName = "Default.asp"


if sAction = "cancel" then
' Menu BeforeCancel Event start
' Menu BeforeCancel Event end

response.redirect sActionFileName
end if

sWhere = ""
bErr = False


' Create WHERE statement
if sAction = "update" or sAction = "delete" then
pPKStart_Date = GetParam("PK_Start_Date")
if IsEmpty(pPKStart_Date) then exit sub
sWhere = "Start_Date=" & ToSQL(pPKStart_Date, "Date")
end if


' Load all form fields into variables

fldStart_Date = GetParam("Start_Date")
' Validate fields
if sAction = "insert" or sAction = "update" then
' Menu Check Event start
' Menu Check Event end

If len(sMenuErr) > 0 then
exit sub
end if
end if


sSQL = ""
' Create SQL statement

select case sAction
case "insert"

' Menu Insert Event start
' Menu Insert Event end

sSQL = "insert into Prj_Milestones (" & _
"Start_Date)" & _
" values (" & _
ToSQL(fldStart_Date, "Date") & _
")"
case "update"

' Menu Update Event start
' Menu Update Event end

sSQL = "update Prj_Milestones set " & _
"Start_Date=" & ToSQL(fldStart_Date, "Date")
sSQL = sSQL & " where " & sWhere
case "delete"
' Menu Delete Event start
' Menu Delete Event end

sSQL = "delete from Prj_Milestones where " & sWhere
end select

' Execute SQL statement

' Menu BeforeExecute Event start
' Menu BeforeExecute Event end

if len(sMenuErr) > 0 then Exit Sub
on error resume next
if bExecSQL then
cn.execute sSQL
end if
sMenuErr = ProceedError
if len(sMenuErr) > 0 then Exit Sub
on error goto 0
response.redirect sActionFileName
' Menu Action end
end sub

Sub Menu_Show()

' Menu Show begin
Dim sWhere, bPK
sWhere = ""

bPK = True

if sMenuErr = "" then
' Load primary key and form parameters
pStart_Date = GetParam("Start_Date")
SetVar "MenuError", ""
else
' Load primary key, form parameters and form fields
fldStart_Date = GetParam("Start_Date")
pStart_Date = GetParam("PK_Start_Date")
SetVar "sMenuErr", sMenuErr
Parse "MenuError", False
end if


if IsEmpty(pStart_Date) then bPK = False

sWhere = sWhere & "Start_Date=" & ToSQL(pStart_Date, "Date")
SetVar "PK_Start_Date", pStart_Date
' Menu Open Event start
' Menu Open Event end


sSQL = "select * from Prj_Milestones where " & sWhere

' Open recordset
openrs rs, sSQL

if bPK and not(sAction = "insert" and sForm = "Menu") and not rs.eof then

if sMenuErr = "" then
' Load data from recordset when form displayed first time
fldStart_Date = GetValue(rs, "Start_Date")
end if
SetVar "MenuInsert", ""
Parse "MenuEdit", False
' Menu ShowEdit Event start
' Menu ShowEdit Event end

else
SetVar "MenuEdit", ""
Parse "MenuInsert", False
' Menu ShowInsert Event start
' Menu ShowInsert Event end

end if
Parse "MenuCancel", false
' Menu Show Event start
' Menu Show Event end

' Show form field

SetVar "Start_Date", ToHTML(fldStart_Date)
Parse "FormMenu", False

' Menu Close Event start
' Menu Close Event end

' Menu Show end

End Sub

%>


Thierry B.
Posted: 07/12/2001, 2:39 PM

Personaly the best popup calendar I seen is at
http://www.dynamicdrive.com/dynamicindex6/popcalendar.htm Use DHTM and
javascript, but the one at clearviewdesign is fine too.


"Jim Ryan" <jryan@stratos.net> a ιcrit dans le messagenews:
9ig999$h6p$1@news.codecharge.com
...
> Hi Ken,
>
> Try this link http://www.clearviewdesign.com/NEWBIE.asp . It shows the
> source code in ASP. This may help. Good luck.


Ken Hardwick
Posted: 07/12/2001, 4:27 PM

Ok...once again..I downloaded the PopupCalendar files...added the
code to various sections of my html page as very specifically instructed.
However, once again., I still can not get this to work with
my asp/html page as generated by Code Charge.

When I run my asp page, I get the "Choose One" hyperlink, but
when I place my curser at that location, I just see "Shortcut to #",
not "Shortcut to popupcalendar.html#" as it should.
Also, when I click on "Choose One" I see a "error on Page"
message in lower status bar.

The text from my default.html file and my default.asp file is below.

I apprecate the various suggestion on what popcalendar to use...however, I
still can not get anyone of
them to work.

Once again, I would really apprecate it if some one could send me a very
small web application using ASP
that the original ASP/html pages were generated from Code Charge and them
modifed to include
a popup calendar that works and populates a text box of a form generated by
CC

I've ask CC support if they could provide an example but they suggested
that I post a question to others here.

Here is still hope-ing that someone out there can help....

KenHardwick@visto.com












<html>
<head>
<title>Projects</title>
<meta name="GENERATOR" content="YesSoftware CodeCharge v.1.2.0 /
Templates.ccp build 5/9/2001">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<script language="JavaScript" src="pupdate.js">

/*
Popup calendar script by Sev Kotchnev (webmaster@personal-connections.com)
For full source code and installation instructions to this script
Visit http://www.dynamicdrive.com
*/

</script>


</head>




<body >
{Header}
<table>
<tr>
<td valign="top">
<!--BeginFormMenu-->
<form method="POST" action="{FileName}" name="Menu">
<table >
<!--BeginMenuError-->
<tr>
<td colspan="2"><font >{sMenuErr}<font></td>
</tr>
<!--EndMenuError-->

<tr>
<td ><font >Start_Date</font></td>
<td ><input type="text" name="Start_Date" maxlength="10"
value="{Start_Date}" size=""><a href="#"
onClick="getCalendarFor(document.menu.start_date);return false">[Choose
one]</a></td>
</tr>

<tr>
<td colspan="2" align="right">

<!-- *** Buttons *** -->

<!--BeginMenuInsert-->
<input type="hidden" value="insert" name="FormAction">
<input type="submit" value="Insert"
onclick="document.Menu.FormAction.value = 'insert';">
<!--EndMenuInsert-->

<!--BeginMenuEdit-->
<input type="hidden" value="update" name="FormAction"/>

<!--BeginMenuUpdate-->
<input type="submit" value="Update"
onclick="document.Menu.FormAction.value = 'update';"/>
<!--EndMenuUpdate-->

<!--EndMenuDelete-->
<input type="submit" value="Delete"
onclick="document.Menu.FormAction.value = 'delete';"/>
<!--EndMenuDelete-->

<!--EndMenuEdit-->

<!--BeginMenuCancel-->
<input type="submit" value="Cancel"
onclick="document.Menu.FormAction.value = 'cancel';"/>
<!--EndMenuCancel-->

<input type="hidden" name="FormName" value="Menu"/>

<input type="hidden" name="PK_Start_Date" value="{PK_Start_Date}"/>
</td>
</tr>
</table>
</form>
<!--EndFormMenu-->

</td>
</tr>
</table>


{Footer}



<script language="JavaScript">
if (document.all) {
document.writeln("<div id=\"PopUpCalendar\" style=\"position:absolute;
left:0px; top:0px; z-index:7; width:200px; height:77px; overflow: visible;
visibility: hidden; background-color: #FFFFFF; border: 1px none #000000\"
onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\"
onMouseOut=\"ppcTI=setTimeout(\'hideCalendar()\',500)\">");
document.writeln("<div id=\"monthSelector\" style=\"position:absolute;
left:0px; top:0px; z-index:9; width:181px; height:27px; overflow: visible;
visibility:inherit\">");}
else if (document.layers) {
document.writeln("<layer id=\"PopUpCalendar\" pagex=\"0\" pagey=\"0\"
width=\"200\" height=\"200\" z-index=\"100\" visibility=\"hide\"
bgcolor=\"#FFFFFF\"
onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\"
onMouseOut=\"ppcTI=setTimeout('hideCalendar()',500)\">");
document.writeln("<layer id=\"monthSelector\" left=\"0\" top=\"0\"
width=\"181\" height=\"27\" z-index=\"9\" visibility=\"inherit\">");}
else {
document.writeln("<p><font color=\"#FF0000\"><b>Error ! The current browser
is either too old or too modern (usind DOM document
structure).</b></font></p>");}
</script>
<noscript><p><font color="#FF0000"><b>JavaScript is not activated
!</b></font></p></noscript>
<table border="1" cellspacing="1" cellpadding="2" width="200"
bordercolorlight="#000000" bordercolordark="#000000" vspace="0"
hspace="0"><form name="ppcMonthList"><tr><td align="center"
bgcolor="#CCCCCC"><a href="javascript:moveMonth('Back')"
onMouseOver="window.status=' ';return true;"><font face="Arial, Helvetica,
sans-serif" size="2" color="#000000"><b>< </b></font></a><font face="MS Sans
Serif, sans-serif" size="1">
<select name="sItem" onMouseOut="if(ppcIE){window.event.cancelBubble =
true;}" onChange="switchMonth(this.options[this.selectedIndex].value)"
style="font-family: 'MS Sans Serif', sans-serif; font-size: 9pt"><option
value="0" selected>2000 • January</option><option value="1">2000 •
February</option><option value="2">2000 • March</option><option
value="3">2000 • April</option><option value="4">2000 • May</option><option
value="5">2000 • June</option><option value="6">2000 • July</option><option
value="7">2000 • August</option><option value="8">2000 •
September</option><option value="9">2000 • October</option><option
value="10">2000 • November</option><option value="11">2000 •
December</option><option value="0">2001 • January</option></select></font><a
href="javascript:moveMonth('Forward')" onMouseOver="window.status=' ';return
true;"><font face="Arial, Helvetica, sans-serif" size="2"
color="#000000"><b> ></b></font></a></td></tr></form></table>
<table border="1" cellspacing="1" cellpadding="2" bordercolorlight="#000000"
bordercolordark="#000000" width="200" vspace="0" hspace="0"><tr
align="center" bgcolor="#CCCCCC"><td width="20" bgcolor="#FFFFCC"><b><font
face="MS Sans Serif, sans-serif" size="1">Su</font></b></td><td
width="20"><b><font face="MS Sans Serif, sans-serif"
size="1">Mo</font></b></td><td width="20"><b><font face="MS Sans Serif,
sans-serif" size="1">Tu</font></b></td><td width="20"><b><font face="MS Sans
Serif, sans-serif" size="1">We</font></b></td><td width="20"><b><font
face="MS Sans Serif, sans-serif" size="1">Th</font></b></td><td
width="20"><b><font face="MS Sans Serif, sans-serif"
size="1">Fr</font></b></td><td width="20" bgcolor="#FFFFCC"><b><font
face="MS Sans Serif, sans-serif" size="1">Sa</font></b></td></tr></table>
<script language="JavaScript">
if (document.all) {
document.writeln("</div>");
document.writeln("<div id=\"monthDays\" style=\"position:absolute;
left:0px; top:52px; z-index:8; width:200px; height:17px; overflow: visible;
visibility:inherit; background-color: #FFFFFF; border: 1px none #000000\">
</div></div>");}
else if (document.layers) {
document.writeln("</layer>");
document.writeln("<layer id=\"monthDays\" left=\"0\" top=\"52\"
width=\"200\" height=\"17\" z-index=\"8\" bgcolor=\"#FFFFFF\"
visibility=\"inherit\"> </layer></layer>");}
else {/*NOP*/}
</script>

</body>
</html>



<!-- #INCLUDE FILE="Common.asp" -->

<%
'
' Filename: Default.asp
' Generated with CodeCharge 1.2.0
' ASPTemplates.ccp build 5/9/2001
'


sFileName = "Default.asp"
sTemplateFileName = "Default.html"


' Default Open Event start
' Default Open Event end


' Default PageSecurity begin

' Default PageSecurity end

' Default OpenAnyPage Event start
' Default OpenAnyPage Event end


LoadTemplate sAppPath & sTemplateFileName, "main"



SetVar "FileName", sFileName


sMenuErr = ""

sAction = GetParam("FormAction")
sForm = GetParam("FormName")
Select Case sForm
Case "Menu"
MenuAction(sAction)
end select

Menu_Show
Parse "main", False
Response.write PrintVar("main")

' Default Close Event start
' Default Close Event end


'--------------------------------------------------


Sub MenuAction(sAction)
dim bExecSQL: bExecSQL = true

' Menu Action begin
sActionFileName = "Default.asp"


if sAction = "cancel" then
' Menu BeforeCancel Event start
' Menu BeforeCancel Event end

response.redirect sActionFileName
end if

sWhere = ""
bErr = False


' Create WHERE statement
if sAction = "update" or sAction = "delete" then
pPKStart_Date = GetParam("PK_Start_Date")
if IsEmpty(pPKStart_Date) then exit sub
sWhere = "Start_Date=" & ToSQL(pPKStart_Date, "Date")
end if


' Load all form fields into variables

fldStart_Date = GetParam("Start_Date")
' Validate fields
if sAction = "insert" or sAction = "update" then
' Menu Check Event start
' Menu Check Event end

If len(sMenuErr) > 0 then
exit sub
end if
end if


sSQL = ""
' Create SQL statement

select case sAction
case "insert"

' Menu Insert Event start
' Menu Insert Event end

sSQL = "insert into Prj_Milestones (" & _
"Start_Date)" & _
" values (" & _
ToSQL(fldStart_Date, "Date") & _
")"
case "update"

' Menu Update Event start
' Menu Update Event end

sSQL = "update Prj_Milestones set " & _
"Start_Date=" & ToSQL(fldStart_Date, "Date")
sSQL = sSQL & " where " & sWhere
case "delete"
' Menu Delete Event start
' Menu Delete Event end

sSQL = "delete from Prj_Milestones where " & sWhere
end select

' Execute SQL statement

' Menu BeforeExecute Event start
' Menu BeforeExecute Event end

if len(sMenuErr) > 0 then Exit Sub
on error resume next
if bExecSQL then
cn.execute sSQL
end if
sMenuErr = ProceedError
if len(sMenuErr) > 0 then Exit Sub
on error goto 0
response.redirect sActionFileName
' Menu Action end
end sub

Sub Menu_Show()

' Menu Show begin
Dim sWhere, bPK
sWhere = ""

bPK = True

if sMenuErr = "" then
' Load primary key and form parameters
pStart_Date = GetParam("Start_Date")
SetVar "MenuError", ""
else
' Load primary key, form parameters and form fields
fldStart_Date = GetParam("Start_Date")
pStart_Date = GetParam("PK_Start_Date")
SetVar "sMenuErr", sMenuErr
Parse "MenuError", False
end if


if IsEmpty(pStart_Date) then bPK = False

sWhere = sWhere & "Start_Date=" & ToSQL(pStart_Date, "Date")
SetVar "PK_Start_Date", pStart_Date
' Menu Open Event start
' Menu Open Event end


sSQL = "select * from Prj_Milestones where " & sWhere

' Open recordset
openrs rs, sSQL

if bPK and not(sAction = "insert" and sForm = "Menu") and not rs.eof then

if sMenuErr = "" then
' Load data from recordset when form displayed first time
fldStart_Date = GetValue(rs, "Start_Date")
end if
SetVar "MenuInsert", ""
Parse "MenuEdit", False
' Menu ShowEdit Event start
' Menu ShowEdit Event end

else
SetVar "MenuEdit", ""
Parse "MenuInsert", False
' Menu ShowInsert Event start
' Menu ShowInsert Event end

end if
Parse "MenuCancel", false
' Menu Show Event start
' Menu Show Event end

' Show form field

SetVar "Start_Date", ToHTML(fldStart_Date)
Parse "FormMenu", False

' Menu Close Event start
' Menu Close Event end

' Menu Show end

End Sub

%>




Thierry B. wrote in message <9il5fd$2r4$1@news.codecharge.com>...
>Personaly the best popup calendar I seen is at
>http://www.dynamicdrive.com/dynamicindex6/popcalendar.htm Use DHTM and
>javascript, but the one at clearviewdesign is fine too.
>
>
>"Jim Ryan" <jryan@stratos.net> a ιcrit dans le messagenews:
>9ig999$h6p$1@news.codecharge.com
...
>> Hi Ken,
>>
>> Try this link http://www.clearviewdesign.com/NEWBIE.asp . It shows the
>> source code in ASP. This may help. Good luck.
>
>
>

Tony Tomov
Posted: 07/13/2001, 12:38 AM

Ken,
here is my recommendation.
Copy the file calendar.html or popupcalendar.html in the web directory,
Your code maybe schould be:


<body >
{Header}
<table>
<tr>
<td valign="top">
<!--BeginFormMenu-->
<form method="POST" action="{FileName}" name="Menu">
<table >
<!--BeginMenuError-->
<tr>
<td colspan="2"><font >{sMenuErr}<font></td>
</tr>
<!--EndMenuError-->

<tr>
<td ><font >Start_Date</font></td>
<td ><input type="text" name="Start_Date" maxlength="10"
value="{Start_Date}" size="">

<!-- modfed code-->
<A HREF="#" onClick="window.dateField =
document.Menu.Start_Date;calendar =
window.open('calendar.html','cal','WIDTH=200,HEIGHT=250')">
<IMG SRC="calendar.gif" BORDER=0></A>
<!-- end of modifed code-->

</td>
</tr>

<tr>
<td colspan="2" align="right">

....

I'm sure, this will work
Best regards
Tony Tomov


Ken Hardwick wrote:

> Ok...once again..I downloaded the PopupCalendar files...added the
> code to various sections of my html page as very specifically instructed.
> However, once again., I still can not get this to work with
> my asp/html page as generated by Code Charge.
>
> When I run my asp page, I get the "Choose One" hyperlink, but
> when I place my curser at that location, I just see "Shortcut to #",
> not "Shortcut to popupcalendar.html#" as it should.
> Also, when I click on "Choose One" I see a "error on Page"
> message in lower status bar.
>
> The text from my default.html file and my default.asp file is below.
>
> I apprecate the various suggestion on what popcalendar to use...however, I
> still can not get anyone of
> them to work.
>
> Once again, I would really apprecate it if some one could send me a very
> small web application using ASP
> that the original ASP/html pages were generated from Code Charge and them
> modifed to include
> a popup calendar that works and populates a text box of a form generated by
> CC
>
> I've ask CC support if they could provide an example but they suggested
> that I post a question to others here.
>
> Here is still hope-ing that someone out there can help....
>
>KenHardwick@visto.com
>
> <html>
> <head>
> <title>Projects</title>
> <meta name="GENERATOR" content="YesSoftware CodeCharge v.1.2.0 /
> Templates.ccp build 5/9/2001">
> <meta http-equiv="pragma" content="no-cache">
> <meta http-equiv="expires" content="0">
> <meta http-equiv="cache-control" content="no-cache">
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
>
> <script language="JavaScript" src="pupdate.js">
>
> /*
> Popup calendar script by Sev Kotchnev (webmaster@personal-connections.com)
> For full source code and installation instructions to this script
> Visit http://www.dynamicdrive.com
> */
>
> </script>
>
> </head>
>
> <body >
> {Header}
> <table>
> <tr>
> <td valign="top">
> <!--BeginFormMenu-->
> <form method="POST" action="{FileName}" name="Menu">
> <table >
> <!--BeginMenuError-->
> <tr>
> <td colspan="2"><font >{sMenuErr}<font></td>
> </tr>
> <!--EndMenuError-->
>
> <tr>
> <td ><font >Start_Date</font></td>
> <td ><input type="text" name="Start_Date" maxlength="10"
> value="{Start_Date}" size=""><a href="#"
> onClick="getCalendarFor(document.menu.start_date);return false">[Choose
> one]</a></td>
> </tr>
>
> <tr>
> <td colspan="2" align="right">
>
> <!-- *** Buttons *** -->
>
> <!--BeginMenuInsert-->
> <input type="hidden" value="insert" name="FormAction">
> <input type="submit" value="Insert"
> onclick="document.Menu.FormAction.value = 'insert';">
> <!--EndMenuInsert-->
>
> <!--BeginMenuEdit-->
> <input type="hidden" value="update" name="FormAction"/>
>
> <!--BeginMenuUpdate-->
> <input type="submit" value="Update"
> onclick="document.Menu.FormAction.value = 'update';"/>
> <!--EndMenuUpdate-->
>
> <!--EndMenuDelete-->
> <input type="submit" value="Delete"
> onclick="document.Menu.FormAction.value = 'delete';"/>
> <!--EndMenuDelete-->
>
> <!--EndMenuEdit-->
>
> <!--BeginMenuCancel-->
> <input type="submit" value="Cancel"
> onclick="document.Menu.FormAction.value = 'cancel';"/>
> <!--EndMenuCancel-->
>
> <input type="hidden" name="FormName" value="Menu"/>
>
> <input type="hidden" name="PK_Start_Date" value="{PK_Start_Date}"/>
> </td>
> </tr>
> </table>
> </form>
> <!--EndFormMenu-->
>
> </td>
> </tr>
> </table>
>
> {Footer}
>
> <script language="JavaScript">
> if (document.all) {
> document.writeln("<div id=\"PopUpCalendar\" style=\"position:absolute;
> left:0px; top:0px; z-index:7; width:200px; height:77px; overflow: visible;
> visibility: hidden; background-color: #FFFFFF; border: 1px none #000000\"
> onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\"
> onMouseOut=\"ppcTI=setTimeout(\'hideCalendar()\',500)\">");
> document.writeln("<div id=\"monthSelector\" style=\"position:absolute;
> left:0px; top:0px; z-index:9; width:181px; height:27px; overflow: visible;
> visibility:inherit\">");}
> else if (document.layers) {
> document.writeln("<layer id=\"PopUpCalendar\" pagex=\"0\" pagey=\"0\"
> width=\"200\" height=\"200\" z-index=\"100\" visibility=\"hide\"
> bgcolor=\"#FFFFFF\"
> onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\"
> onMouseOut=\"ppcTI=setTimeout('hideCalendar()',500)\">");
> document.writeln("<layer id=\"monthSelector\" left=\"0\" top=\"0\"
> width=\"181\" height=\"27\" z-index=\"9\" visibility=\"inherit\">");}
> else {
> document.writeln("<p><font color=\"#FF0000\"><b>Error ! The current browser
> is either too old or too modern (usind DOM document
> structure).</b></font></p>");}
> </script>
> <noscript><p><font color="#FF0000"><b>JavaScript is not activated
> !</b></font></p></noscript>
> <table border="1" cellspacing="1" cellpadding="2" width="200"
> bordercolorlight="#000000" bordercolordark="#000000" vspace="0"
> hspace="0"><form name="ppcMonthList"><tr><td align="center"
> bgcolor="#CCCCCC"><a href="javascript:moveMonth('Back')"
> onMouseOver="window.status=' ';return true;"><font face="Arial, Helvetica,
> sans-serif" size="2" color="#000000"><b>< </b></font></a><font face="MS Sans
> Serif, sans-serif" size="1">
> <select name="sItem" onMouseOut="if(ppcIE){window.event.cancelBubble =
> true;}" onChange="switchMonth(this.options[this.selectedIndex].value)"
> style="font-family: 'MS Sans Serif', sans-serif; font-size: 9pt"><option
> value="0" selected>2000 • January</option><option value="1">2000 •
> February</option><option value="2">2000 • March</option><option
> value="3">2000 • April</option><option value="4">2000 • May</option><option
> value="5">2000 • June</option><option value="6">2000 • July</option><option
> value="7">2000 • August</option><option value="8">2000 •
> September</option><option value="9">2000 • October</option><option
> value="10">2000 • November</option><option value="11">2000 •
> December</option><option value="0">2001 • January</option></select></font><a
> href="javascript:moveMonth('Forward')" onMouseOver="window.status=' ';return
> true;"><font face="Arial, Helvetica, sans-serif" size="2"
> color="#000000"><b> ></b></font></a></td></tr></form></table>
> <table border="1" cellspacing="1" cellpadding="2" bordercolorlight="#000000"
> bordercolordark="#000000" width="200" vspace="0" hspace="0"><tr
> align="center" bgcolor="#CCCCCC"><td width="20" bgcolor="#FFFFCC"><b><font
> face="MS Sans Serif, sans-serif" size="1">Su</font></b></td><td
> width="20"><b><font face="MS Sans Serif, sans-serif"
> size="1">Mo</font></b></td><td width="20"><b><font face="MS Sans Serif,
> sans-serif" size="1">Tu</font></b></td><td width="20"><b><font face="MS Sans
> Serif, sans-serif" size="1">We</font></b></td><td width="20"><b><font
> face="MS Sans Serif, sans-serif" size="1">Th</font></b></td><td
> width="20"><b><font face="MS Sans Serif, sans-serif"
> size="1">Fr</font></b></td><td width="20" bgcolor="#FFFFCC"><b><font
> face="MS Sans Serif, sans-serif" size="1">Sa</font></b></td></tr></table>
> <script language="JavaScript">
> if (document.all) {
> document.writeln("</div>");
> document.writeln("<div id=\"monthDays\" style=\"position:absolute;
> left:0px; top:52px; z-index:8; width:200px; height:17px; overflow: visible;
> visibility:inherit; background-color: #FFFFFF; border: 1px none #000000\">
> </div></div>");}
> else if (document.layers) {
> document.writeln("</layer>");
> document.writeln("<layer id=\"monthDays\" left=\"0\" top=\"52\"
> width=\"200\" height=\"17\" z-index=\"8\" bgcolor=\"#FFFFFF\"
> visibility=\"inherit\"> </layer></layer>");}
> else {/*NOP*/}
> </script>
>
> </body>
> </html>
>
> <!-- #INCLUDE FILE="Common.asp" -->
>
> <%
> '
> ' Filename: Default.asp
> ' Generated with CodeCharge 1.2.0
> ' ASPTemplates.ccp build 5/9/2001
> '
>
> sFileName = "Default.asp"
> sTemplateFileName = "Default.html"
>
> ' Default Open Event start
> ' Default Open Event end
>
> ' Default PageSecurity begin
>
> ' Default PageSecurity end
>
> ' Default OpenAnyPage Event start
> ' Default OpenAnyPage Event end
>
> LoadTemplate sAppPath & sTemplateFileName, "main"
>
> SetVar "FileName", sFileName
>
> sMenuErr = ""
>
> sAction = GetParam("FormAction")
> sForm = GetParam("FormName")
> Select Case sForm
> Case "Menu"
> MenuAction(sAction)
> end select
>
> Menu_Show
> Parse "main", False
> Response.write PrintVar("main")
>
> ' Default Close Event start
> ' Default Close Event end
>
> '--------------------------------------------------
>
> Sub MenuAction(sAction)
> dim bExecSQL: bExecSQL = true
>
> ' Menu Action begin
> sActionFileName = "Default.asp"
>
> if sAction = "cancel" then
> ' Menu BeforeCancel Event start
> ' Menu BeforeCancel Event end
>
> response.redirect sActionFileName
> end if
>
> sWhere = ""
> bErr = False
>
> ' Create WHERE statement
> if sAction = "update" or sAction = "delete" then
> pPKStart_Date = GetParam("PK_Start_Date")
> if IsEmpty(pPKStart_Date) then exit sub
> sWhere = "Start_Date=" & ToSQL(pPKStart_Date, "Date")
> end if
>
> ' Load all form fields into variables
>
> fldStart_Date = GetParam("Start_Date")
> ' Validate fields
> if sAction = "insert" or sAction = "update" then
> ' Menu Check Event start
> ' Menu Check Event end
>
> If len(sMenuErr) > 0 then
> exit sub
> end if
> end if
>
> sSQL = ""
> ' Create SQL statement
>
> select case sAction
> case "insert"
>
> ' Menu Insert Event start
> ' Menu Insert Event end
>
> sSQL = "insert into Prj_Milestones (" & _
> "Start_Date)" & _
> " values (" & _
> ToSQL(fldStart_Date, "Date") & _
> ")"
> case "update"
>
> ' Menu Update Event start
> ' Menu Update Event end
>
> sSQL = "update Prj_Milestones set " & _
> "Start_Date=" & ToSQL(fldStart_Date, "Date")
> sSQL = sSQL & " where " & sWhere
> case "delete"
> ' Menu Delete Event start
> ' Menu Delete Event end
>
> sSQL = "delete from Prj_Milestones where " & sWhere
> end select
>
> ' Execute SQL statement
>
> ' Menu BeforeExecute Event start
> ' Menu BeforeExecute Event end
>
> if len(sMenuErr) > 0 then Exit Sub
> on error resume next
> if bExecSQL then
> cn.execute sSQL
> end if
> sMenuErr = ProceedError
> if len(sMenuErr) > 0 then Exit Sub
> on error goto 0
> response.redirect sActionFileName
> ' Menu Action end
> end sub
>
> Sub Menu_Show()
>
> ' Menu Show begin
> Dim sWhere, bPK
> sWhere = ""
>
> bPK = True
>
> if sMenuErr = "" then
> ' Load primary key and form parameters
> pStart_Date = GetParam("Start_Date")
> SetVar "MenuError", ""
> else
> ' Load primary key, form parameters and form fields
> fldStart_Date = GetParam("Start_Date")
> pStart_Date = GetParam("PK_Start_Date")
> SetVar "sMenuErr", sMenuErr
> Parse "MenuError", False
> end if
>
> if IsEmpty(pStart_Date) then bPK = False
>
> sWhere = sWhere & "Start_Date=" & ToSQL(pStart_Date, "Date")
> SetVar "PK_Start_Date", pStart_Date
> ' Menu Open Event start
> ' Menu Open Event end
>
> sSQL = "select * from Prj_Milestones where " & sWhere
>
> ' Open recordset
> openrs rs, sSQL
>
> if bPK and not(sAction = "insert" and sForm = "Menu") and not rs.eof then
>
> if sMenuErr = "" then
> ' Load data from recordset when form displayed first time
> fldStart_Date = GetValue(rs, "Start_Date")
> end if
> SetVar "MenuInsert", ""
> Parse "MenuEdit", False
> ' Menu ShowEdit Event start
> ' Menu ShowEdit Event end
>
> else
> SetVar "MenuEdit", ""
> Parse "MenuInsert", False
> ' Menu ShowInsert Event start
> ' Menu ShowInsert Event end
>
> end if
> Parse "MenuCancel", false
> ' Menu Show Event start
> ' Menu Show Event end
>
> ' Show form field
>
> SetVar "Start_Date", ToHTML(fldStart_Date)
> Parse "FormMenu", False
>
> ' Menu Close Event start
> ' Menu Close Event end
>
> ' Menu Show end
>
> End Sub
>
> %>
>
> Thierry B. wrote in message <9il5fd$2r4$1@news.codecharge.com>...
> >Personaly the best popup calendar I seen is at
> >http://www.dynamicdrive.com/dynamicindex6/popcalendar.htm Use DHTM and
> >javascript, but the one at clearviewdesign is fine too.
> >
> >
> >"Jim Ryan" <jryan@stratos.net> a ιcrit dans le messagenews:
> >9ig999$h6p$1@news.codecharge.com
...
> >> Hi Ken,
> >>
> >> Try this link http://www.clearviewdesign.com/NEWBIE.asp . It shows the
> >> source code in ASP. This may help. Good luck.
> >
> >
> >
Ken Hardwick
Posted: 07/13/2001, 4:37 AM

Tony,

Well finally thanks to your help (and suggestion from others) , I have
gotten this to work...not sure what I was doing wrong..but this code you
provided works just as you indicated.

I sure you were getting frustrated in my continuing to ask for help on this
but I just could not get it to work.

Once again, thanks....thanks...thanks..

Ken Hardwick
Norman, Oklahoma


Tony Tomov wrote in message <3B4EA5E3.6C72BE15@abs.bg>...
>Ken,
>here is my recommendation.
>Copy the file calendar.html or popupcalendar.html in the web directory,
>Your code maybe schould be:
>
>
><body >
>{Header}
> <table>
> <tr>
> <td valign="top">
> <!--BeginFormMenu-->
> <form method="POST" action="{FileName}" name="Menu">
> <table >
> <!--BeginMenuError-->
> <tr>
> <td colspan="2"><font >{sMenuErr}<font></td>
> </tr>
> <!--EndMenuError-->
>
> <tr>
> <td ><font >Start_Date</font></td>
> <td ><input type="text" name="Start_Date" maxlength="10"
>value="{Start_Date}" size="">
>
><!-- modfed code-->
><A HREF="#" onClick="window.dateField =
>document.Menu.Start_Date;calendar =
>window.open('calendar.html','cal','WIDTH=200,HEIGHT=250')">
><IMG SRC="calendar.gif" BORDER=0></A>
><!-- end of modifed code-->
>
></td>
> </tr>
>
> <tr>
> <td colspan="2" align="right">
>
>...
>
>I'm sure, this will work
>Best regards
>Tony Tomov
>
>
>Ken Hardwick wrote:
>
>> Ok...once again..I downloaded the PopupCalendar files...added the
>> code to various sections of my html page as very specifically instructed.
>> However, once again., I still can not get this to work with
>> my asp/html page as generated by Code Charge.
>>
>> When I run my asp page, I get the "Choose One" hyperlink, but
>> when I place my curser at that location, I just see "Shortcut to #",
>> not "Shortcut to popupcalendar.html#" as it should.
>> Also, when I click on "Choose One" I see a "error on Page"
>> message in lower status bar.
>>
>> The text from my default.html file and my default.asp file is below.
>>
>> I apprecate the various suggestion on what popcalendar to use...however,
I
>> still can not get anyone of
>> them to work.
>>
>> Once again, I would really apprecate it if some one could send me a very
>> small web application using ASP
>> that the original ASP/html pages were generated from Code Charge and them
>> modifed to include
>> a popup calendar that works and populates a text box of a form generated
by
>> CC
>>
>> I've ask CC support if they could provide an example but they suggested
>> that I post a question to others here.
>>
>> Here is still hope-ing that someone out there can help....
>>
>>KenHardwick@visto.com
>>
>> <html>
>> <head>
>> <title>Projects</title>
>> <meta name="GENERATOR" content="YesSoftware CodeCharge v.1.2.0 /
>> Templates.ccp build 5/9/2001">
>> <meta http-equiv="pragma" content="no-cache">
>> <meta http-equiv="expires" content="0">
>> <meta http-equiv="cache-control" content="no-cache">
>> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
>>
>> <script language="JavaScript" src="pupdate.js">
>>
>> /*
>> Popup calendar script by Sev Kotchnev
(webmaster@personal-connections.com)
>> For full source code and installation instructions to this script
>> Visit http://www.dynamicdrive.com
>> */
>>
>> </script>
>>
>> </head>
>>
>> <body >
>> {Header}
>> <table>
>> <tr>
>> <td valign="top">
>> <!--BeginFormMenu-->
>> <form method="POST" action="{FileName}" name="Menu">
>> <table >
>> <!--BeginMenuError-->
>> <tr>
>> <td colspan="2"><font >{sMenuErr}<font></td>
>> </tr>
>> <!--EndMenuError-->
>>
>> <tr>
>> <td ><font >Start_Date</font></td>
>> <td ><input type="text" name="Start_Date" maxlength="10"
>> value="{Start_Date}" size=""><a href="#"
>> onClick="getCalendarFor(document.menu.start_date);return false">[Choose
>> one]</a></td>
>> </tr>
>>
>> <tr>
>> <td colspan="2" align="right">
>>
>> <!-- *** Buttons *** -->
>>
>> <!--BeginMenuInsert-->
>> <input type="hidden" value="insert" name="FormAction">
>> <input type="submit" value="Insert"
>> onclick="document.Menu.FormAction.value = 'insert';">
>> <!--EndMenuInsert-->
>>
>> <!--BeginMenuEdit-->
>> <input type="hidden" value="update" name="FormAction"/>
>>
>> <!--BeginMenuUpdate-->
>> <input type="submit" value="Update"
>> onclick="document.Menu.FormAction.value = 'update';"/>
>> <!--EndMenuUpdate-->
>>
>> <!--EndMenuDelete-->
>> <input type="submit" value="Delete"
>> onclick="document.Menu.FormAction.value = 'delete';"/>
>> <!--EndMenuDelete-->
>>
>> <!--EndMenuEdit-->
>>
>> <!--BeginMenuCancel-->
>> <input type="submit" value="Cancel"
>> onclick="document.Menu.FormAction.value = 'cancel';"/>
>> <!--EndMenuCancel-->
>>
>> <input type="hidden" name="FormName" value="Menu"/>
>>
>> <input type="hidden" name="PK_Start_Date" value="{PK_Start_Date}"/>
>> </td>
>> </tr>
>> </table>
>> </form>
>> <!--EndFormMenu-->
>>
>> </td>
>> </tr>
>> </table>
>>
>> {Footer}
>>
>> <script language="JavaScript">
>> if (document.all) {
>> document.writeln("<div id=\"PopUpCalendar\" style=\"position:absolute;
>> left:0px; top:0px; z-index:7; width:200px; height:77px; overflow:
visible;
>> visibility: hidden; background-color: #FFFFFF; border: 1px none #000000\"
>> onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\"
>> onMouseOut=\"ppcTI=setTimeout(\'hideCalendar()\',500)\">");
>> document.writeln("<div id=\"monthSelector\" style=\"position:absolute;
>> left:0px; top:0px; z-index:9; width:181px; height:27px; overflow:
visible;
>> visibility:inherit\">");}
>> else if (document.layers) {
>> document.writeln("<layer id=\"PopUpCalendar\" pagex=\"0\" pagey=\"0\"
>> width=\"200\" height=\"200\" z-index=\"100\" visibility=\"hide\"
>> bgcolor=\"#FFFFFF\"
>> onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\"
>> onMouseOut=\"ppcTI=setTimeout('hideCalendar()',500)\">");
>> document.writeln("<layer id=\"monthSelector\" left=\"0\" top=\"0\"
>> width=\"181\" height=\"27\" z-index=\"9\" visibility=\"inherit\">");}
>> else {
>> document.writeln("<p><font color=\"#FF0000\"><b>Error ! The current
browser
>> is either too old or too modern (usind DOM document
>> structure).</b></font></p>");}
>> </script>
>> <noscript><p><font color="#FF0000"><b>JavaScript is not activated
>> !</b></font></p></noscript>
>> <table border="1" cellspacing="1" cellpadding="2" width="200"
>> bordercolorlight="#000000" bordercolordark="#000000" vspace="0"
>> hspace="0"><form name="ppcMonthList"><tr><td align="center"
>> bgcolor="#CCCCCC"><a href="javascript:moveMonth('Back')"
>> onMouseOver="window.status=' ';return true;"><font face="Arial,
Helvetica,
>> sans-serif" size="2" color="#000000"><b>< </b></font></a><font face="MS
Sans
>> Serif, sans-serif" size="1">
>> <select name="sItem" onMouseOut="if(ppcIE){window.event.cancelBubble =
>> true;}" onChange="switchMonth(this.options[this.selectedIndex].value)"
>> style="font-family: 'MS Sans Serif', sans-serif; font-size: 9pt"><option
>> value="0" selected>2000  January</option><option value="1">2000 
>> February</option><option value="2">2000  March</option><option
>> value="3">2000  April</option><option value="4">2000 
May</option><option
>> value="5">2000  June</option><option value="6">2000 
July</option><option
>> value="7">2000  August</option><option value="8">2000 
>> September</option><option value="9">2000  October</option><option
>> value="10">2000  November</option><option value="11">2000 
>> December</option><option value="0">2001 
January</option></select></font><a
>> href="javascript:moveMonth('Forward')" onMouseOver="window.status='
';return
>> true;"><font face="Arial, Helvetica, sans-serif" size="2"
>> color="#000000"><b> ></b></font></a></td></tr></form></table>
>> <table border="1" cellspacing="1" cellpadding="2"
bordercolorlight="#000000"
>> bordercolordark="#000000" width="200" vspace="0" hspace="0"><tr
>> align="center" bgcolor="#CCCCCC"><td width="20"
bgcolor="#FFFFCC"><b><font
>> face="MS Sans Serif, sans-serif" size="1">Su</font></b></td><td
>> width="20"><b><font face="MS Sans Serif, sans-serif"
>> size="1">Mo</font></b></td><td width="20"><b><font face="MS Sans Serif,
>> sans-serif" size="1">Tu</font></b></td><td width="20"><b><font face="MS
Sans
>> Serif, sans-serif" size="1">We</font></b></td><td width="20"><b><font
>> face="MS Sans Serif, sans-serif" size="1">Th</font></b></td><td
>> width="20"><b><font face="MS Sans Serif, sans-serif"
>> size="1">Fr</font></b></td><td width="20" bgcolor="#FFFFCC"><b><font
>> face="MS Sans Serif, sans-serif" size="1">Sa</font></b></td></tr></table>
>> <script language="JavaScript">
>> if (document.all) {
>> document.writeln("</div>");
>> document.writeln("<div id=\"monthDays\" style=\"position:absolute;
>> left:0px; top:52px; z-index:8; width:200px; height:17px; overflow:
visible;
>> visibility:inherit; background-color: #FFFFFF; border: 1px none
#000000\">
>> </div></div>");}
>> else if (document.layers) {
>> document.writeln("</layer>");
>> document.writeln("<layer id=\"monthDays\" left=\"0\" top=\"52\"
>> width=\"200\" height=\"17\" z-index=\"8\" bgcolor=\"#FFFFFF\"
>> visibility=\"inherit\"> </layer></layer>");}
>> else {/*NOP*/}
>> </script>
>>
>> </body>
>> </html>
>>
>> <!-- #INCLUDE FILE="Common.asp" -->
>>
>> <%
>> '
>> ' Filename: Default.asp
>> ' Generated with CodeCharge 1.2.0
>> ' ASPTemplates.ccp build 5/9/2001
>> '
>>
>> sFileName = "Default.asp"
>> sTemplateFileName = "Default.html"
>>
>> ' Default Open Event start
>> ' Default Open Event end
>>
>> ' Default PageSecurity begin
>>
>> ' Default PageSecurity end
>>
>> ' Default OpenAnyPage Event start
>> ' Default OpenAnyPage Event end
>>
>> LoadTemplate sAppPath & sTemplateFileName, "main"
>>
>> SetVar "FileName", sFileName
>>
>> sMenuErr = ""
>>
>> sAction = GetParam("FormAction")
>> sForm = GetParam("FormName")
>> Select Case sForm
>> Case "Menu"
>> MenuAction(sAction)
>> end select
>>
>> Menu_Show
>> Parse "main", False
>> Response.write PrintVar("main")
>>
>> ' Default Close Event start
>> ' Default Close Event end
>>
>> '--------------------------------------------------
>>
>> Sub MenuAction(sAction)
>> dim bExecSQL: bExecSQL = true
>>
>> ' Menu Action begin
>> sActionFileName = "Default.asp"
>>
>> if sAction = "cancel" then
>> ' Menu BeforeCancel Event start
>> ' Menu BeforeCancel Event end
>>
>> response.redirect sActionFileName
>> end if
>>
>> sWhere = ""
>> bErr = False
>>
>> ' Create WHERE statement
>> if sAction = "update" or sAction = "delete" then
>> pPKStart_Date = GetParam("PK_Start_Date")
>> if IsEmpty(pPKStart_Date) then exit sub
>> sWhere = "Start_Date=" & ToSQL(pPKStart_Date, "Date")
>> end if
>>
>> ' Load all form fields into variables
>>
>> fldStart_Date = GetParam("Start_Date")
>> ' Validate fields
>> if sAction = "insert" or sAction = "update" then
>> ' Menu Check Event start
>> ' Menu Check Event end
>>
>> If len(sMenuErr) > 0 then
>> exit sub
>> end if
>> end if
>>
>> sSQL = ""
>> ' Create SQL statement
>>
>> select case sAction
>> case "insert"
>>
>> ' Menu Insert Event start
>> ' Menu Insert Event end
>>
>> sSQL = "insert into Prj_Milestones (" & _
>> "Start_Date)" & _
>> " values (" & _
>> ToSQL(fldStart_Date, "Date") & _
>> ")"
>> case "update"
>>
>> ' Menu Update Event start
>> ' Menu Update Event end
>>
>> sSQL = "update Prj_Milestones set " & _
>> "Start_Date=" & ToSQL(fldStart_Date, "Date")
>> sSQL = sSQL & " where " & sWhere
>> case "delete"
>> ' Menu Delete Event start
>> ' Menu Delete Event end
>>
>> sSQL = "delete from Prj_Milestones where " & sWhere
>> end select
>>
>> ' Execute SQL statement
>>
>> ' Menu BeforeExecute Event start
>> ' Menu BeforeExecute Event end
>>
>> if len(sMenuErr) > 0 then Exit Sub
>> on error resume next
>> if bExecSQL then
>> cn.execute sSQL
>> end if
>> sMenuErr = ProceedError
>> if len(sMenuErr) > 0 then Exit Sub
>> on error goto 0
>> response.redirect sActionFileName
>> ' Menu Action end
>> end sub
>>
>> Sub Menu_Show()
>>
>> ' Menu Show begin
>> Dim sWhere, bPK
>> sWhere = ""
>>
>> bPK = True
>>
>> if sMenuErr = "" then
>> ' Load primary key and form parameters
>> pStart_Date = GetParam("Start_Date")
>> SetVar "MenuError", ""
>> else
>> ' Load primary key, form parameters and form fields
>> fldStart_Date = GetParam("Start_Date")
>> pStart_Date = GetParam("PK_Start_Date")
>> SetVar "sMenuErr", sMenuErr
>> Parse "MenuError", False
>> end if
>>
>> if IsEmpty(pStart_Date) then bPK = False
>>
>> sWhere = sWhere & "Start_Date=" & ToSQL(pStart_Date, "Date")
>> SetVar "PK_Start_Date", pStart_Date
>> ' Menu Open Event start
>> ' Menu Open Event end
>>
>> sSQL = "select * from Prj_Milestones where " & sWhere
>>
>> ' Open recordset
>> openrs rs, sSQL
>>
>> if bPK and not(sAction = "insert" and sForm = "Menu") and not rs.eof
then
>>
>> if sMenuErr = "" then
>> ' Load data from recordset when form displayed first time
>> fldStart_Date = GetValue(rs, "Start_Date")
>> end if
>> SetVar "MenuInsert", ""
>> Parse "MenuEdit", False
>> ' Menu ShowEdit Event start
>> ' Menu ShowEdit Event end
>>
>> else
>> SetVar "MenuEdit", ""
>> Parse "MenuInsert", False
>> ' Menu ShowInsert Event start
>> ' Menu ShowInsert Event end
>>
>> end if
>> Parse "MenuCancel", false
>> ' Menu Show Event start
>> ' Menu Show Event end
>>
>> ' Show form field
>>
>> SetVar "Start_Date", ToHTML(fldStart_Date)
>> Parse "FormMenu", False
>>
>> ' Menu Close Event start
>> ' Menu Close Event end
>>
>> ' Menu Show end
>>
>> End Sub
>>
>> %>
>>
>> Thierry B. wrote in message <9il5fd$2r4$1@news.codecharge.com>...
>> >Personaly the best popup calendar I seen is at
>> >http://www.dynamicdrive.com/dynamicindex6/popcalendar.htm Use DHTM and
>> >javascript, but the one at clearviewdesign is fine too.
>> >
>> >
>> >"Jim Ryan" <jryan@stratos.net> a ecrit dans le messagenews:
>> >9ig999$h6p$1@news.codecharge.com
...
>> >> Hi Ken,
>> >>
>> >> Try this link http://www.clearviewdesign.com/NEWBIE.asp . It shows the
>> >> source code in ASP. This may help. Good luck.
>> >
>> >
>> >
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.