Hi
I have a page written in VBScript, which uses values from a page posted to it, to send an e-mail. The problem is that when I try to specify a control within the page I get an error, saying "Object Required : Document". Here is a piece of the code:
The problem occures when I try to reference the control by specifying the document and form that the controls in.
I have also tried Document.forms( o).chkmatching1 , but that doesn'y work either, I get the same error.
Any help will be appreciated.
Thanks
I have a page written in VBScript, which uses values from a page posted to it, to send an e-mail. The problem is that when I try to specify a control within the page I get an error, saying "Object Required : Document". Here is a piece of the code:
Code:
<%@ Language=VBScript %> <% Dim szMail szMail = "<form id= SendAccounting name = SendAccounting language=VBScript>"&_ "<table>"&_ "<TR>"&_ "<TD><STRONG><FONT size = 6; color = #ff3366;>"&"Accounting Instruction"&"</FONT></STRONG>"&_ "</TD>"&_ "</TR>"&_ "<TR>"&_ "</TR>"&_ "</table>"&_ "<TABLE>" &_ "<TR>"&_ "<STRONG><FONT color = #ff6666;>" & "Please mark one of the following:" & "</FONT> </STRONG>" &_ "</TR>"&_ "<TR>"&_ "<TD><STRONG>"& "Matching Instruction:" & "</STRONG><INPUT id= chkMatching type= checkbox name= chkMatching> </TD>"&_ "<TD><STRONG>"& "Journal:"&"</STRONG></STRONG><INPUT id= chkJournal type= checkbox name= chkJournal> </TD>"&_ "<TD><STRONG>"& "Write Off:"&"</STRONG></STRONG><INPUT id= chkWriteOff type= checkbox name= chkWriteOff> </TD>"&_ "</TR>"&_ "<TR>"&_ "</TR>"&_ "<TR>"&_ "</TR>"&_ "</TABLE>"&_ "</form>" Dim TheForm Set TheForm = document.SendAccounting if request.Form("chkMatching")= "on" then SendAccounting.chkMatching1.checked end if
I have also tried Document.forms( o).chkmatching1 , but that doesn'y work either, I get the same error.
Any help will be appreciated.
Thanks
Comment