TheDrParker
Programmer
I have a textbox DTC connected to a recordset that I want to make updateable. I want to be able to capture the change to use to update the recordset later.
I have tried:
<SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server>
Sub thisPage_onenter()
DataTxtBox1.advise "onblur", "UpdateRec()"
End Sub
</SCRIPT>
<SCRIPT LANGUAGE=vbscript RUNAT=server>
Sub UpdateRec()
thispage.setTextVal(DataTxtBox1.value)
Response.Write("Updating Rec:"
Response.Write(thispage.getTextVal())
Response.Write("<BR>"
End Sub
</SCRIPT>
<script language=javascript>
function thisPage_onbeforeserverevent(obj,evnt)
{
if (obj=="DataTxtBox1"
{
if (evnt=="onblur"
{
if (DataTxtBox1.value == ""
{
thisPage.cancelEvent=true;
alert("No Sir."
}
else
{
}
}
}
}
</script>
And I have tried:
<SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server>
Sub DataTxtBox1_onchange()
thisPage.setTextVal(DataTxtBox1.value)
Session("Test1" = DataTxtBox1.value
End Sub
</SCRIPT>
In either case after OnChange or OnBlur the page calls itself and the textbox value is reset by recordset. How do I capture the value in the textbox before it is replaced by the value in the recordset when the page is called.
BTW: Session('Test') and thisPage.setTextVal() can't capture it in the onbeforeserverevent because that is client side.
Any help greatly appreciated
I have tried:
<SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server>
Sub thisPage_onenter()
DataTxtBox1.advise "onblur", "UpdateRec()"
End Sub
</SCRIPT>
<SCRIPT LANGUAGE=vbscript RUNAT=server>
Sub UpdateRec()
thispage.setTextVal(DataTxtBox1.value)
Response.Write("Updating Rec:"
Response.Write(thispage.getTextVal())
Response.Write("<BR>"
End Sub
</SCRIPT>
<script language=javascript>
function thisPage_onbeforeserverevent(obj,evnt)
{
if (obj=="DataTxtBox1"
{
if (evnt=="onblur"
{
if (DataTxtBox1.value == ""
{
thisPage.cancelEvent=true;
alert("No Sir."
}
else
{
}
}
}
}
</script>
And I have tried:
<SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server>
Sub DataTxtBox1_onchange()
thisPage.setTextVal(DataTxtBox1.value)
Session("Test1" = DataTxtBox1.value
End Sub
</SCRIPT>
In either case after OnChange or OnBlur the page calls itself and the textbox value is reset by recordset. How do I capture the value in the textbox before it is replaced by the value in the recordset when the page is called.
BTW: Session('Test') and thisPage.setTextVal() can't capture it in the onbeforeserverevent because that is client side.
Any help greatly appreciated