Hi,
I'm using a function I've used successfully before with dropdown listboxes, but its not working with checkboxes. Basically, if the "breakfast" box is NOT checked (from screen or database) the element does NOT get picked up when I use Request.Form in the function btnSave_onclick. Code is below for some kind person. I hope the Visual Interdev Designtime Control code isn't too much of a distraction! (I don't think it affects this problem)
<%@ Language=JavaScript %>
<% // VI 6.0 Scripting Object Model Enabled %>
<!--#include file="_ScriptLibrary/pm.asp"-->
<% if (StartPageProcessing()) Response.End() %>
<FORM name=thisForm METHOD=post>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<LINK rel="stylesheet" type="text/css" href="Style1.css">
<SCRIPT ID=serverEventHandlersJS LANGUAGE=javascript RUNAT=Server>
function btnSave_onclick() {
if (Request.Form.Count > 0)
{
var tempRS = loRS.getRecordSource();
var num = 0;
for (var i = 1; i <= Request.Form("abspos".Count;i = i + 1)
{
num = Request.Form("abspos"(i);
tempRS.absolutePosition = parseInt(num, 10);
if (Request.Form("breakfast"(i) == "true"
{
tempRS("breakfast" = "true";
}
else
{
tempRS("breakfast" = "false";
}
}
tempRS.update;
loRS.setRecordSource(tempRS);
Response.Write("<P class=two>"
Response.Write("Save Successful"
Response.Write("</P>"
}
}
</SCRIPT>
<% var backcolor = "white"; %>
</head>
<body bgcolor="<%=backcolor%>">
<%
var pTempCookie = unescape(Request.QueryString);
var TempData = pTempCookie.split("&"
var spersonid = parseInt(TempData[0], 10);
var sfirst = TempData[1];
var ssur = TempData[2];
var sError = TempData[3];
var visitid = Request.Cookies("visit"
var z = 1;
Response.Cookies("fname" = sfirst;
Response.Cookies("sname" = ssur;
Response.Cookies("person" = spersonid;
loRS.close();
loRS.setParameter(1, spersonid);
loRS.open();
%>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0" id=loRS style="LEFT: 0px; TOP: 0px">
<PARAM NAME="ExtentX" VALUE="12197">
<PARAM NAME="ExtentY" VALUE="2090">
<PARAM NAME="State" VALUE="(TCConn=\qraasayConn\q,TCDBObject=\qStored\sProcedures\q,TCDBObjectName=\qIndPlanner\s(dbo)\q,TCControlID_Unmatched=\qloRS\q,TCPPConn=\qraasayConn\q,RCDBObject=\qRCDBObject\q,TCPPDBObject=\qStored\sProcedures\q,TCPPDBObjectName=\qIndPlanner\s(dbo)\q,TCCursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatched=\q30\q,TCCommTimeout_Unmatched=\q10\q,CCPrepared=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,TCODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q,TCHTargetBrowser_Unmatched=\qServer\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\spage\q,RCCache=\qRCBookPage\q,CCOpen=0,GCParameters=(Rows=1,Row1=(CType_Unmatched=\qIn\q,CParName_Unmatched=\q@personid\q,CDataType_Unmatched=\qInteger\q,CSize_Unmatched=\q0\q,CReq=0)))"></OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Recordset.ASP"-->
<SCRIPT LANGUAGE="JavaScript" RUNAT="server">
function _setParametersloRS()
{
}
function _initloRS()
{
loRS.advise(RS_ONBEFOREOPEN, _setParametersloRS);
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout = Application('raasayConn_ConnectionTimeout');
DBConn.CommandTimeout = Application('raasayConn_CommandTimeout');
DBConn.CursorLocation = Application('raasayConn_CursorLocation');
DBConn.Open(Application('raasayConn_ConnectionString'), Application('raasayConn_RuntimeUserName'), Application('raasayConn_RuntimePassword'));
var cmdTmp = Server.CreateObject('ADODB.Command');
var rsTmp = Server.CreateObject('ADODB.Recordset');
cmdTmp.ActiveConnection = DBConn;
rsTmp.Source = cmdTmp;
cmdTmp.CommandType = 4;
cmdTmp.CommandTimeout = 10;
cmdTmp.CommandText = '"IndPlanner"';
rsTmp.CacheSize = 30;
rsTmp.CursorType = 3;
rsTmp.CursorLocation = 3;
rsTmp.LockType = 3;
loRS.setRecordSource(rsTmp);
if (thisPage.getState('pb_loRS') != null)
loRS.setBookmark(thisPage.getState('pb_loRS'));
}
function _loRS_ctor()
{
CreateRecordset('loRS', _initloRS, null);
}
function _loRS_dtor()
{
loRS._preserveState();
thisPage.setState('pb_loRS', loRS.getBookmark());
}
</SCRIPT>
<!--METADATA TYPE="DesignerControl" endspan-->
<TABLE>
<TR>
<TD width=200></TD>
<TD width=400 class="four">Individual Planner - <%=sfirst%> <%=ssur%>
</TD>
</TR>
<TR>
<TD><a class="two" href="Javascript:window.close()">Close Window</a>
</TD>
<TD class="two"><%=sError%></TD>
<TD width=400></TD>
<TD>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:B6FC3A14-F837-11D0-9CC8-006008058731" height=27 id=btnSave style="HEIGHT: 27px; LEFT: 0px; TOP: 0px; WIDTH: 52px"
width=52>
<PARAM NAME="_ExtentX" VALUE="1376">
<PARAM NAME="_ExtentY" VALUE="714">
<PARAM NAME="id" VALUE="btnSave">
<PARAM NAME="Caption" VALUE="Save">
<PARAM NAME="Image" VALUE="">
<PARAM NAME="AltText" VALUE="">
<PARAM NAME="Visible" VALUE="-1">
<PARAM NAME="Platform" VALUE="256">
<PARAM NAME="LocalPath" VALUE=""></OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Button.ASP"-->
<SCRIPT LANGUAGE=JavaScript RUNAT= Server>
function _initbtnSave()
{
btnSave.value = 'Save';
btnSave.setStyle(0);
}
function _btnSave_ctor()
{
CreateButton('btnSave', _initbtnSave, null);
}
</script>
<% btnSave.display(); %>
<!--METADATA TYPE="DesignerControl" endspan-->
</TD>
</TR>
</TABLE>
<TABLE>
<TR>
<TD></TD><TD class="one">Date</TD>
<TD class="one">Breakfast </TD>
</TR>
<%
if (!loRS.EOF)
{
while (!(loRS.EOF))
{
%>
<TR>
<TD><INPUT TYPE="HIDDEN" NAME="abspos" VALUE=<%=loRS.absolutePosition%>>
</TD>
<TD>
<%=loRS.fields.getValue("visitdate"%>
</TD>
<TD>
<input type="checkbox" name="breakfast" value="<%=loRS.fields.getValue("breakfast"%>"
<% if (loRS.fields.getValue("breakfast" == "true"{%> CHECKED <% } %> >
</TD>
</TR>
<%
z++;
loRS.moveNext();
}
}
else
{
%>
<P class="one"> Please Initialise IND_DAILY_PLAN</P><br>
<%
}
%>
<TR>
<TD width=200><a class="two" href="Javascript:window.close()">Close Window</a>
</TD>
</TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>
<TD>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:B6FC3A14-F837-11D0-9CC8-006008058731" height=27 id=btnSave style="HEIGHT: 27px; LEFT: 0px; TOP: 0px; WIDTH: 52px"
width=52>
<PARAM NAME="_ExtentX" VALUE="1376">
<PARAM NAME="_ExtentY" VALUE="714">
<PARAM NAME="id" VALUE="btnSave">
<PARAM NAME="Caption" VALUE="Save">
<PARAM NAME="Image" VALUE="">
<PARAM NAME="AltText" VALUE="">
<PARAM NAME="Visible" VALUE="-1">
<PARAM NAME="Platform" VALUE="256">
<PARAM NAME="LocalPath" VALUE=""></OBJECT>
-->
<SCRIPT LANGUAGE=JavaScript RUNAT= Server>
function _initbtnSave()
{
btnSave.value = 'Save';
btnSave.setStyle(0);
}
function _btnSave_ctor()
{
CreateButton('btnSave', _initbtnSave, null);
}
</script>
<% btnSave.display(); %>
<!--METADATA TYPE="DesignerControl" endspan-->
</TD>
</TR>
</TABLE>
<P>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:CEB04D01-0445-11D1-BB81-006097C553C8" id=VisitManager style="LEFT: 0px; TOP: 0px">
<PARAM NAME="ExtentX" VALUE="4233">
<PARAM NAME="ExtentY" VALUE="609">
<PARAM NAME="State" VALUE="(txtName_Unmatched=\qVisitManager\q,txtNewMode_Unmatched=\q\q,grFormMode=(Rows=2,Row1=(txtMode_Unmatched=\qDisplay\q),Row2=(txtMode_Unmatched=\qUpdated\q)),txtDefaultMode=\qDisplay\q,grMasterMode=(Rows=5,Row1=(txtName_Unmatched=\q1\q,txtControl_Unmatched=\qbtnSave\q,txtProperty_Unmatched=\qshow\q,txtValue_Unmatched=\q()\q),Row2=(txtName_Unmatched=\q1\q,txtControl_Unmatched=\qbtnSave\q,txtProperty_Unmatched=\qdisabled\q,txtValue_Unmatched=\qfalse\q),Row3=(txtName_Unmatched=\q1\q,txtControl_Unmatched=\qbtnFill\q,txtProperty_Unmatched=\qhide\q,txtValue_Unmatched=\q()\q),Row4=(txtName_Unmatched=\q2\q,txtControl_Unmatched=\qbtnFill\q,txtProperty_Unmatched=\qshow\q,txtValue_Unmatched=\q()\q),Row5=(txtName_Unmatched=\q2\q,txtControl_Unmatched=\qbtnFill\q,txtProperty_Unmatched=\qdisabled\q,txtValue_Unmatched=\qfalse\q)),grTransitions=(Rows=4,Row1=(txtCurrentMode=\qDisplay\q,txtObject=\qbtnSave\q,txtEvent=\qonclick\q,txtNextMode=\qUpdated\q),Row2=(txtCurrentMode=\qUpdated\q,txtObject=\qbtnSave\q,txtEvent=\qonclick\q,txtNextMode=\qUpdated\q),Row3=(txtCurrentMode=\qDisplay\q,txtObject=\qbtnFill\q,txtEvent=\qonclick\q,txtNextMode=\qUpdated\q),Row4=(txtCurrentMode=\qUpdated\q,txtObject=\qbtnFill\q,txtEvent=\qonclick\q,txtNextMode=\qUpdated\q)),grMasterStep=(Rows=4,Row1=(txtName_Unmatched=\q1\q),Row2=(txtName_Unmatched=\q2\q),Row3=(txtName_Unmatched=\q3\q),Row4=(txtName_Unmatched=\q4\q)))"></OBJECT>
-->
<SCRIPT RUNAT=SERVER LANGUAGE="JavaScript">
function _VisitManager_ctor()
{
thisPage.advise(PAGE_ONINIT, _VisitManager_init);
}
function _VisitManager_init()
{
if (thisPage.getState("VisitManager_formmode" == null)
_VisitManager_SetMode("Display"
btnSave.advise("onclick", "_VisitManager_btnSave_onclick()"
btnFill.advise("onclick", "_VisitManager_btnFill_onclick()"
}
function _VisitManager_SetMode(formmode)
{
thisPage.setState("VisitManager_formmode", formmode);
if (formmode == "Display"
{
btnSave.show();
btnSave.disabled = false;
btnFill.hide();
}
if (formmode == "Updated"
{
btnFill.show();
btnFill.disabled = false;
}
}
function _VisitManager_btnSave_onclick()
{
if (thisPage.getState("VisitManager_formmode" == "Display"
{
_VisitManager_SetMode("Updated"
}
else if (thisPage.getState("VisitManager_formmode" == "Updated"
{
_VisitManager_SetMode("Updated"
}
else _VisitManager_SetMode(thisPage.getState("VisitManager_formmode")
}
function _VisitManager_btnFill_onclick()
{
if (thisPage.getState("VisitManager_formmode" == "Display"
{
_VisitManager_SetMode("Updated"
}
else if (thisPage.getState("VisitManager_formmode" == "Updated"
{
_VisitManager_SetMode("Updated"
}
else _VisitManager_SetMode(thisPage.getState("VisitManager_formmode")
}
</SCRIPT>
<!--METADATA TYPE="DesignerControl" endspan-->
</P>
</body>
<% // VI 6.0 Scripting Object Model Enabled %>
<% EndPageProcessing() %>
</FORM>
</html>
I'm using a function I've used successfully before with dropdown listboxes, but its not working with checkboxes. Basically, if the "breakfast" box is NOT checked (from screen or database) the element does NOT get picked up when I use Request.Form in the function btnSave_onclick. Code is below for some kind person. I hope the Visual Interdev Designtime Control code isn't too much of a distraction! (I don't think it affects this problem)
<%@ Language=JavaScript %>
<% // VI 6.0 Scripting Object Model Enabled %>
<!--#include file="_ScriptLibrary/pm.asp"-->
<% if (StartPageProcessing()) Response.End() %>
<FORM name=thisForm METHOD=post>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<LINK rel="stylesheet" type="text/css" href="Style1.css">
<SCRIPT ID=serverEventHandlersJS LANGUAGE=javascript RUNAT=Server>
function btnSave_onclick() {
if (Request.Form.Count > 0)
{
var tempRS = loRS.getRecordSource();
var num = 0;
for (var i = 1; i <= Request.Form("abspos".Count;i = i + 1)
{
num = Request.Form("abspos"(i);
tempRS.absolutePosition = parseInt(num, 10);
if (Request.Form("breakfast"(i) == "true"
{
tempRS("breakfast" = "true";
}
else
{
tempRS("breakfast" = "false";
}
}
tempRS.update;
loRS.setRecordSource(tempRS);
Response.Write("<P class=two>"
Response.Write("Save Successful"
Response.Write("</P>"
}
}
</SCRIPT>
<% var backcolor = "white"; %>
</head>
<body bgcolor="<%=backcolor%>">
<%
var pTempCookie = unescape(Request.QueryString);
var TempData = pTempCookie.split("&"
var spersonid = parseInt(TempData[0], 10);
var sfirst = TempData[1];
var ssur = TempData[2];
var sError = TempData[3];
var visitid = Request.Cookies("visit"
var z = 1;
Response.Cookies("fname" = sfirst;
Response.Cookies("sname" = ssur;
Response.Cookies("person" = spersonid;
loRS.close();
loRS.setParameter(1, spersonid);
loRS.open();
%>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0" id=loRS style="LEFT: 0px; TOP: 0px">
<PARAM NAME="ExtentX" VALUE="12197">
<PARAM NAME="ExtentY" VALUE="2090">
<PARAM NAME="State" VALUE="(TCConn=\qraasayConn\q,TCDBObject=\qStored\sProcedures\q,TCDBObjectName=\qIndPlanner\s(dbo)\q,TCControlID_Unmatched=\qloRS\q,TCPPConn=\qraasayConn\q,RCDBObject=\qRCDBObject\q,TCPPDBObject=\qStored\sProcedures\q,TCPPDBObjectName=\qIndPlanner\s(dbo)\q,TCCursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatched=\q30\q,TCCommTimeout_Unmatched=\q10\q,CCPrepared=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,TCODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q,TCHTargetBrowser_Unmatched=\qServer\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\spage\q,RCCache=\qRCBookPage\q,CCOpen=0,GCParameters=(Rows=1,Row1=(CType_Unmatched=\qIn\q,CParName_Unmatched=\q@personid\q,CDataType_Unmatched=\qInteger\q,CSize_Unmatched=\q0\q,CReq=0)))"></OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Recordset.ASP"-->
<SCRIPT LANGUAGE="JavaScript" RUNAT="server">
function _setParametersloRS()
{
}
function _initloRS()
{
loRS.advise(RS_ONBEFOREOPEN, _setParametersloRS);
var DBConn = Server.CreateObject('ADODB.Connection');
DBConn.ConnectionTimeout = Application('raasayConn_ConnectionTimeout');
DBConn.CommandTimeout = Application('raasayConn_CommandTimeout');
DBConn.CursorLocation = Application('raasayConn_CursorLocation');
DBConn.Open(Application('raasayConn_ConnectionString'), Application('raasayConn_RuntimeUserName'), Application('raasayConn_RuntimePassword'));
var cmdTmp = Server.CreateObject('ADODB.Command');
var rsTmp = Server.CreateObject('ADODB.Recordset');
cmdTmp.ActiveConnection = DBConn;
rsTmp.Source = cmdTmp;
cmdTmp.CommandType = 4;
cmdTmp.CommandTimeout = 10;
cmdTmp.CommandText = '"IndPlanner"';
rsTmp.CacheSize = 30;
rsTmp.CursorType = 3;
rsTmp.CursorLocation = 3;
rsTmp.LockType = 3;
loRS.setRecordSource(rsTmp);
if (thisPage.getState('pb_loRS') != null)
loRS.setBookmark(thisPage.getState('pb_loRS'));
}
function _loRS_ctor()
{
CreateRecordset('loRS', _initloRS, null);
}
function _loRS_dtor()
{
loRS._preserveState();
thisPage.setState('pb_loRS', loRS.getBookmark());
}
</SCRIPT>
<!--METADATA TYPE="DesignerControl" endspan-->
<TABLE>
<TR>
<TD width=200></TD>
<TD width=400 class="four">Individual Planner - <%=sfirst%> <%=ssur%>
</TD>
</TR>
<TR>
<TD><a class="two" href="Javascript:window.close()">Close Window</a>
</TD>
<TD class="two"><%=sError%></TD>
<TD width=400></TD>
<TD>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:B6FC3A14-F837-11D0-9CC8-006008058731" height=27 id=btnSave style="HEIGHT: 27px; LEFT: 0px; TOP: 0px; WIDTH: 52px"
width=52>
<PARAM NAME="_ExtentX" VALUE="1376">
<PARAM NAME="_ExtentY" VALUE="714">
<PARAM NAME="id" VALUE="btnSave">
<PARAM NAME="Caption" VALUE="Save">
<PARAM NAME="Image" VALUE="">
<PARAM NAME="AltText" VALUE="">
<PARAM NAME="Visible" VALUE="-1">
<PARAM NAME="Platform" VALUE="256">
<PARAM NAME="LocalPath" VALUE=""></OBJECT>
-->
<!--#INCLUDE FILE="_ScriptLibrary/Button.ASP"-->
<SCRIPT LANGUAGE=JavaScript RUNAT= Server>
function _initbtnSave()
{
btnSave.value = 'Save';
btnSave.setStyle(0);
}
function _btnSave_ctor()
{
CreateButton('btnSave', _initbtnSave, null);
}
</script>
<% btnSave.display(); %>
<!--METADATA TYPE="DesignerControl" endspan-->
</TD>
</TR>
</TABLE>
<TABLE>
<TR>
<TD></TD><TD class="one">Date</TD>
<TD class="one">Breakfast </TD>
</TR>
<%
if (!loRS.EOF)
{
while (!(loRS.EOF))
{
%>
<TR>
<TD><INPUT TYPE="HIDDEN" NAME="abspos" VALUE=<%=loRS.absolutePosition%>>
</TD>
<TD>
<%=loRS.fields.getValue("visitdate"%>
</TD>
<TD>
<input type="checkbox" name="breakfast" value="<%=loRS.fields.getValue("breakfast"%>"
<% if (loRS.fields.getValue("breakfast" == "true"{%> CHECKED <% } %> >
</TD>
</TR>
<%
z++;
loRS.moveNext();
}
}
else
{
%>
<P class="one"> Please Initialise IND_DAILY_PLAN</P><br>
<%
}
%>
<TR>
<TD width=200><a class="two" href="Javascript:window.close()">Close Window</a>
</TD>
</TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD>
<TD>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:B6FC3A14-F837-11D0-9CC8-006008058731" height=27 id=btnSave style="HEIGHT: 27px; LEFT: 0px; TOP: 0px; WIDTH: 52px"
width=52>
<PARAM NAME="_ExtentX" VALUE="1376">
<PARAM NAME="_ExtentY" VALUE="714">
<PARAM NAME="id" VALUE="btnSave">
<PARAM NAME="Caption" VALUE="Save">
<PARAM NAME="Image" VALUE="">
<PARAM NAME="AltText" VALUE="">
<PARAM NAME="Visible" VALUE="-1">
<PARAM NAME="Platform" VALUE="256">
<PARAM NAME="LocalPath" VALUE=""></OBJECT>
-->
<SCRIPT LANGUAGE=JavaScript RUNAT= Server>
function _initbtnSave()
{
btnSave.value = 'Save';
btnSave.setStyle(0);
}
function _btnSave_ctor()
{
CreateButton('btnSave', _initbtnSave, null);
}
</script>
<% btnSave.display(); %>
<!--METADATA TYPE="DesignerControl" endspan-->
</TD>
</TR>
</TABLE>
<P>
<!--METADATA TYPE="DesignerControl" startspan
<OBJECT classid="clsid:CEB04D01-0445-11D1-BB81-006097C553C8" id=VisitManager style="LEFT: 0px; TOP: 0px">
<PARAM NAME="ExtentX" VALUE="4233">
<PARAM NAME="ExtentY" VALUE="609">
<PARAM NAME="State" VALUE="(txtName_Unmatched=\qVisitManager\q,txtNewMode_Unmatched=\q\q,grFormMode=(Rows=2,Row1=(txtMode_Unmatched=\qDisplay\q),Row2=(txtMode_Unmatched=\qUpdated\q)),txtDefaultMode=\qDisplay\q,grMasterMode=(Rows=5,Row1=(txtName_Unmatched=\q1\q,txtControl_Unmatched=\qbtnSave\q,txtProperty_Unmatched=\qshow\q,txtValue_Unmatched=\q()\q),Row2=(txtName_Unmatched=\q1\q,txtControl_Unmatched=\qbtnSave\q,txtProperty_Unmatched=\qdisabled\q,txtValue_Unmatched=\qfalse\q),Row3=(txtName_Unmatched=\q1\q,txtControl_Unmatched=\qbtnFill\q,txtProperty_Unmatched=\qhide\q,txtValue_Unmatched=\q()\q),Row4=(txtName_Unmatched=\q2\q,txtControl_Unmatched=\qbtnFill\q,txtProperty_Unmatched=\qshow\q,txtValue_Unmatched=\q()\q),Row5=(txtName_Unmatched=\q2\q,txtControl_Unmatched=\qbtnFill\q,txtProperty_Unmatched=\qdisabled\q,txtValue_Unmatched=\qfalse\q)),grTransitions=(Rows=4,Row1=(txtCurrentMode=\qDisplay\q,txtObject=\qbtnSave\q,txtEvent=\qonclick\q,txtNextMode=\qUpdated\q),Row2=(txtCurrentMode=\qUpdated\q,txtObject=\qbtnSave\q,txtEvent=\qonclick\q,txtNextMode=\qUpdated\q),Row3=(txtCurrentMode=\qDisplay\q,txtObject=\qbtnFill\q,txtEvent=\qonclick\q,txtNextMode=\qUpdated\q),Row4=(txtCurrentMode=\qUpdated\q,txtObject=\qbtnFill\q,txtEvent=\qonclick\q,txtNextMode=\qUpdated\q)),grMasterStep=(Rows=4,Row1=(txtName_Unmatched=\q1\q),Row2=(txtName_Unmatched=\q2\q),Row3=(txtName_Unmatched=\q3\q),Row4=(txtName_Unmatched=\q4\q)))"></OBJECT>
-->
<SCRIPT RUNAT=SERVER LANGUAGE="JavaScript">
function _VisitManager_ctor()
{
thisPage.advise(PAGE_ONINIT, _VisitManager_init);
}
function _VisitManager_init()
{
if (thisPage.getState("VisitManager_formmode" == null)
_VisitManager_SetMode("Display"
btnSave.advise("onclick", "_VisitManager_btnSave_onclick()"
btnFill.advise("onclick", "_VisitManager_btnFill_onclick()"
}
function _VisitManager_SetMode(formmode)
{
thisPage.setState("VisitManager_formmode", formmode);
if (formmode == "Display"
{
btnSave.show();
btnSave.disabled = false;
btnFill.hide();
}
if (formmode == "Updated"
{
btnFill.show();
btnFill.disabled = false;
}
}
function _VisitManager_btnSave_onclick()
{
if (thisPage.getState("VisitManager_formmode" == "Display"
{
_VisitManager_SetMode("Updated"
}
else if (thisPage.getState("VisitManager_formmode" == "Updated"
{
_VisitManager_SetMode("Updated"
}
else _VisitManager_SetMode(thisPage.getState("VisitManager_formmode")
}
function _VisitManager_btnFill_onclick()
{
if (thisPage.getState("VisitManager_formmode" == "Display"
{
_VisitManager_SetMode("Updated"
}
else if (thisPage.getState("VisitManager_formmode" == "Updated"
{
_VisitManager_SetMode("Updated"
}
else _VisitManager_SetMode(thisPage.getState("VisitManager_formmode")
}
</SCRIPT>
<!--METADATA TYPE="DesignerControl" endspan-->
</P>
</body>
<% // VI 6.0 Scripting Object Model Enabled %>
<% EndPageProcessing() %>
</FORM>
</html>