G
Guest
I've converted a form over to a DAP. The form has a submit button which
should save the record and display a confirmation message box. The record is
being saved but the message is not working. I've put the code for the message
box in the afterupdate event because eventually I want to put some
verifications in here as well. I'm a total rookie at scripting and cannot
get this to work! Can someone review the code below and tell me what I'm
doing wrong? Thanks.
<SCRIPT language=javascript event=onclick for=SubmitMe>
try { if (MSODSC.DataPages.Count > 0)
if (MSODSC.CurrentSection == null)
MSODSC.DataPages(0).Update();
else
MSODSC.CurrentSection.DataPage.Recordset.Update;}
catch (e)
{ alert (e.description);}
</SCRIPT>
<SCRIPT language=vbscript event=onafterupdate for=SubmitMe>
<!--
' Display a confirmation message
Dim MyResponse, ConfMsg
ConfMsg = "Request Submitted."
MyResponse = MsgBox(ConfMsg,0,"Confirmation Message")
-->
</SCRIPT>
should save the record and display a confirmation message box. The record is
being saved but the message is not working. I've put the code for the message
box in the afterupdate event because eventually I want to put some
verifications in here as well. I'm a total rookie at scripting and cannot
get this to work! Can someone review the code below and tell me what I'm
doing wrong? Thanks.
<SCRIPT language=javascript event=onclick for=SubmitMe>
try { if (MSODSC.DataPages.Count > 0)
if (MSODSC.CurrentSection == null)
MSODSC.DataPages(0).Update();
else
MSODSC.CurrentSection.DataPage.Recordset.Update;}
catch (e)
{ alert (e.description);}
</SCRIPT>
<SCRIPT language=vbscript event=onafterupdate for=SubmitMe>
<!--
' Display a confirmation message
Dim MyResponse, ConfMsg
ConfMsg = "Request Submitted."
MyResponse = MsgBox(ConfMsg,0,"Confirmation Message")
-->
</SCRIPT>