Hello,
I'm working on my first Data Access Page and could use some help.
I have muliple text fields to enter data into, then I have a save button. This all works fine. However I have a dialog box to open to say "Your submission has been accepted". And have 2 buttons, one will return to the parent page to add a new record, the other to the switchboard. Everything works fine except that the parent page no longer clears the fields once i added the script to open the dialog box. I'm a total newbie and would appreciate any help. This is what I have in the parent page:
<BUTTON id=Command2
style="Z-INDEX: 9; LEFT: 19.075cm; OVERFLOW: hidden; WIDTH: 2.245cm; POSITION: absolute; TOP: 26.327cm; HEIGHT: 0.605cm; BACKGROUND-COLOR: maroon"
tabIndex=46 MsoTextAlign="General"><FONT style="BACKGROUND-COLOR: #800000"
face="Baskerville Old Face" color=#ffffff size=3>Save</FONT></BUTTON>
<SCRIPT language=javascript event=onclick for=Command2>
try { if (MSODSC.DataPages.Count > 0)
if (MSODSC.CurrentSection == null)
MSODSC.DataPages(0).Save();
else
MSODSC.CurrentSection.DataPage.Save(); }
catch (e)
{ alert (e.description);}
</SCRIPT>
<SCRIPT language=javascript event=onclick for=Command2>
showModalDialog ("accdp://4418344/",null,"dialogheight:800px;dialogwidth:900px;scrollbars:no;directories:no;location:no;status:no;borders:no");
</SCRIPT>
And so far in the dialog box (I haven't added the button to go to the switchboard yet)
<BUTTON id=Command0
style="Z-INDEX: 1; LEFT: 8.494cm; OVERFLOW: hidden; WIDTH: 3.018cm; POSITION: absolute; TOP: 1.694cm; HEIGHT: 0.899cm"
tabIndex=1 MsoTextAlign="General">Add another patient</BUTTON></DIV>
<SCRIPT language=javascript event=onclick for=Undo>
try { if (MSODSC.DataPages.Count > 0)
if (MSODSC.CurrentSection == null)
MSODSC.DataPages(0).Command0();
else
MSODSC.CurrentSection.DataPage.Command0(); }
catch (e)
{ alert (e.description);}
</SCRIPT>
<SCRIPT language=vbscript event=onclick for=Command0>
window.close
</SCRIPT>
I'm working on my first Data Access Page and could use some help.
I have muliple text fields to enter data into, then I have a save button. This all works fine. However I have a dialog box to open to say "Your submission has been accepted". And have 2 buttons, one will return to the parent page to add a new record, the other to the switchboard. Everything works fine except that the parent page no longer clears the fields once i added the script to open the dialog box. I'm a total newbie and would appreciate any help. This is what I have in the parent page:
<BUTTON id=Command2
style="Z-INDEX: 9; LEFT: 19.075cm; OVERFLOW: hidden; WIDTH: 2.245cm; POSITION: absolute; TOP: 26.327cm; HEIGHT: 0.605cm; BACKGROUND-COLOR: maroon"
tabIndex=46 MsoTextAlign="General"><FONT style="BACKGROUND-COLOR: #800000"
face="Baskerville Old Face" color=#ffffff size=3>Save</FONT></BUTTON>
<SCRIPT language=javascript event=onclick for=Command2>
try { if (MSODSC.DataPages.Count > 0)
if (MSODSC.CurrentSection == null)
MSODSC.DataPages(0).Save();
else
MSODSC.CurrentSection.DataPage.Save(); }
catch (e)
{ alert (e.description);}
</SCRIPT>
<SCRIPT language=javascript event=onclick for=Command2>
showModalDialog ("accdp://4418344/",null,"dialogheight:800px;dialogwidth:900px;scrollbars:no;directories:no;location:no;status:no;borders:no");
</SCRIPT>
And so far in the dialog box (I haven't added the button to go to the switchboard yet)
<BUTTON id=Command0
style="Z-INDEX: 1; LEFT: 8.494cm; OVERFLOW: hidden; WIDTH: 3.018cm; POSITION: absolute; TOP: 1.694cm; HEIGHT: 0.899cm"
tabIndex=1 MsoTextAlign="General">Add another patient</BUTTON></DIV>
<SCRIPT language=javascript event=onclick for=Undo>
try { if (MSODSC.DataPages.Count > 0)
if (MSODSC.CurrentSection == null)
MSODSC.DataPages(0).Command0();
else
MSODSC.CurrentSection.DataPage.Command0(); }
catch (e)
{ alert (e.description);}
</SCRIPT>
<SCRIPT language=vbscript event=onclick for=Command0>
window.close
</SCRIPT>