473,831 Members | 2,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VBScript - Cannot specify the document or form.

7 New Member
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=VBScri pt %>
<%
Dim szMail

szMail = "<form id= SendAccounting name = SendAccounting language=VBScri pt>"&_
"<table>"&_
"<TR>"&_
"<TD><STRONG><F ONT size = 6; color = #ff3366;>"&"Acc ounting Instruction"&"</FONT></STRONG>"&_
"</TD>"&_
"</TR>"&_
"<TR>"&_
"</TR>"&_
"</table>"&_


"<TABLE>" &_
"<TR>"&_
"<STRONG><F ONT color = #ff6666;>" & "Please mark one of the following:" & "</FONT> </STRONG>" &_
"</TR>"&_
"<TR>"&_
"<TD><STRON G>"& "Matching Instruction:" & "</STRONG><INPUT id= chkMatching type= checkbox name= chkMatching>&nb sp;&nbsp;&nbsp; &nbsp;</TD>"&_
"<TD><STRON G>"& "Journal:"& "</STRONG></STRONG><INPUT id= chkJournal type= checkbox name= chkJournal>&nbs p;&nbsp;&nbsp;& nbsp;</TD>"&_
"<TD><STRON G>"& "Write Off:"&"</STRONG></STRONG><INPUT id= chkWriteOff type= checkbox name= chkWriteOff>&nb sp;&nbsp;&nbsp; &nbsp;</TD>"&_
"</TR>"&_
"<TR>"&_
"</TR>"&_
"<TR>"&_
"</TR>"&_
"</TABLE>"&_
"</form>"

Dim TheForm
Set TheForm = document.SendAc counting

if request.Form("c hkMatching")= "on" then
SendAccounting. chkMatching1.ch ecked
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 1108

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

Similar topics

0
3477
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 - plus some buttons to dynamically resize the image. I have gotten almost everything to work - I put in a function to simply disable the right-click option of the browser, but none of the other functions work. If I copy the source data out of...
8
5484
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 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
2
2599
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 information is lost. What am I doing wrong? After obtaining the variable, I assign it back to a Label text field on the form, it shows up on the web page no problem.
2
2854
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 anyone suggest a btter way of passing a session var into a vbscript function? <%@ Page language="c#" debug="true" ContentType="text/html"
2
2899
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 work (no error message) in my large program where I needed to dump out the stuff. I did get an error message from FrontPage 2003 but it was not informative. When moved the vbscript to the bottom of the page it worked fine! ========start of...
10
2168
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 "Object Required : Document". Here is a piece of the code: <%@ Language=VBScript %> <% Dim szMail szMail = "<form id= SendAccounting name = SendAccounting language=VBScript>"&_
2
4567
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 is popped up by another ASP page and there are authentication, privilege and security stuff involved. And yes this page contain a lot of javascript. there is a <DIV></DIV> in this page for me. And my job is as simple as put another page between...
1
3889
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 Days" name=revisit-after> <META content=info@siderinternational.com name=email> <META content="Omer Safdar" name=author> <META content=MegaStudios.com name=publisher> <META content="Copyright ©2005 - MegaStudios.com" name=copyright> <SCRIPT...
1
4720
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 the form is filled in and posted, the response from the server is an XML response. However when that happens, I'm not longer at my asp page, I'm redirected the XML response URL that's managed by the third party server.
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10494
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10534
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10207
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7748
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3963
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.