473,385 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VBScript - Cannot specify the document or form.

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 the 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>&nbsp;&nbsp;&nbsp;&nbsp;</TD>"&_
"<TD><STRONG>"& "Journal:"&"</STRONG></STRONG><INPUT id= chkJournal type= checkbox name= chkJournal>&nbsp;&nbsp;&nbsp;&nbsp;</TD>"&_
"<TD><STRONG>"& "Write Off:"&"</STRONG></STRONG><INPUT id= chkWriteOff type= checkbox name= chkWriteOff>&nbsp;&nbsp;&nbsp;&nbsp;</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

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).chkmatching, but that doesn'y work either.

Any help will be appreciated.

Thanks
Feb 26 '07 #1
0 1095

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Trevor Fairchild | last post by:
I'm trying to have VB6 write an html file during run-time, with some VBScript functionality. The intent is to display images based on the current record within the program - using a WebBrowser -...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: ChucRock | last post by:
Hi, I have the following code where there is some client side VBScript that does something and needs to pass a variable back to the ASP.NET page. When the page is updated through a postback, the...
2
by: Frank | last post by:
Can I do this? I add a session var in C# and ultimatly want to pass it into a vbscript client side activeX control. This is what I have so far but get " Object Required:'name2' " error. Can...
2
by: Beemer Biker | last post by:
I put together a few lines of vbscript so I could dump the contents of a string to my C drive. It worked fine in a small test.htm where I put the vbscript at the top of the file. It failed to...
10
by: Dino123 | last post by:
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...
2
by: tunk | last post by:
I dont know where to start my question so let me tell you my story :) The ASP that cause me trouble is running on IIS that set ASP default language to JScript instead of VBScript. This ASP page...
1
by: mudasserrafiq | last post by:
I am using following asp file default.asp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="0...
1
by: xernoth | last post by:
Hi there, Just a quick question. I'm more familiar with C# and ASP.NET but need to use ASP/VBScript for a quick project. I have a form that uploads content to a server not managed by us. When...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.