473,548 Members | 2,585 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Object Does not support this property or Method error

I have the following code:

<Script LANGUAGE=vbscri pt RUNAT=Server>

for i =0 to document.form1. elements.count-1

response.write "test"

next

</Script>

When it gets to the line for i=0.... the error message pops up stating that
Object does not support this Property or Method.

I have a from name form1.

Please help.







Jul 19 '05 #1
7 5000
it's because the server doesn't know what
document.form1. elements.count
is, that's my bet.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Roberta McGervey" <ra********@a tc-nec.com> wrote in message
news:Ok******** ******@TK2MSFTN GP12.phx.gbl...
I have the following code:

<Script LANGUAGE=vbscri pt RUNAT=Server>

for i =0 to document.form1. elements.count-1

response.write "test"

next

</Script>

When it gets to the line for i=0.... the error message pops up stating that Object does not support this Property or Method.

I have a from name form1.

Please help.







Jul 19 '05 #2
Looks like you are mixing Javascript with VBScript IMHO.

Stuart
"Roberta McGervey" <ra********@a tc-nec.com> wrote in message
news:Ok******** ******@TK2MSFTN GP12.phx.gbl...
I have the following code:

<Script LANGUAGE=vbscri pt RUNAT=Server>

for i =0 to document.form1. elements.count-1

response.write "test"

next

</Script>

When it gets to the line for i=0.... the error message pops up stating that Object does not support this Property or Method.

I have a from name form1.

Please help.







Jul 19 '05 #3
I got the following code from MSDN to use as an example. So if I am mixing
to two languages it is because the MSDN is incorrect.

<SCRIPT LANGUAGE="VBScr ipt">
<!-
Sub cmdChange_OnCli ck
For i=0 To Document.frmFor m.Elements.Coun t-1
Document.frmFor m.Elements(i).V alue="Changed!"
Next
End Sub
->
</SCRIPT>
"Stuart" <st****@nowhere .co.uk> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l...
Looks like you are mixing Javascript with VBScript IMHO.

Stuart
"Roberta McGervey" <ra********@a tc-nec.com> wrote in message
news:Ok******** ******@TK2MSFTN GP12.phx.gbl...
I have the following code:

<Script LANGUAGE=vbscri pt RUNAT=Server>

for i =0 to document.form1. elements.count-1

response.write "test"

next

</Script>

When it gets to the line for i=0.... the error message pops up stating

that
Object does not support this Property or Method.

I have a from name form1.

Please help.








Jul 19 '05 #4
I'm new to this so is there a setting on the web server I can change so that
it recognizes this statement?

I found a different way to do what I want to do but it would require more
code. From the interdev and vbscript courses I took online this statment
should work.

Thanks.
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:ue******** ******@TK2MSFTN GP12.phx.gbl...
it's because the server doesn't know what
document.form1. elements.count
is, that's my bet.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Roberta McGervey" <ra********@a tc-nec.com> wrote in message
news:Ok******** ******@TK2MSFTN GP12.phx.gbl...
I have the following code:

<Script LANGUAGE=vbscri pt RUNAT=Server>

for i =0 to document.form1. elements.count-1

response.write "test"

next

</Script>

When it gets to the line for i=0.... the error message pops up stating

that
Object does not support this Property or Method.

I have a from name form1.

Please help.








Jul 19 '05 #5
that is CLIENTSIDE code though, not SERVER

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Roberta McGervey" <ra********@a tc-nec.com> wrote in message
news:eD******** ******@TK2MSFTN GP09.phx.gbl...
I got the following code from MSDN to use as an example. So if I am mixing to two languages it is because the MSDN is incorrect.

<SCRIPT LANGUAGE="VBScr ipt">
<!-
Sub cmdChange_OnCli ck
For i=0 To Document.frmFor m.Elements.Coun t-1
Document.frmFor m.Elements(i).V alue="Changed!"
Next
End Sub
->
</SCRIPT>
"Stuart" <st****@nowhere .co.uk> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l...
Looks like you are mixing Javascript with VBScript IMHO.

Stuart
"Roberta McGervey" <ra********@a tc-nec.com> wrote in message
news:Ok******** ******@TK2MSFTN GP12.phx.gbl...
I have the following code:

<Script LANGUAGE=vbscri pt RUNAT=Server>

for i =0 to document.form1. elements.count-1

response.write "test"

next

</Script>

When it gets to the line for i=0.... the error message pops up stating

that
Object does not support this Property or Method.

I have a from name form1.

Please help.









Jul 19 '05 #6
Roberta McGervey wrote:
I'm new to this so is there a setting on the web server I can change
so that it recognizes this statement?
No. "document" is a client-side DHTML object. Server-side code knows nothing
about client-side DHTML.

I found a different way to do what I want to do but it would require
more code. From the interdev and vbscript courses I took online this
statment should work.


Then you need to reread those sources. You can never reference a client-side
object or property from server-side code, and vice versa.
Your code would work fine if you removed the "RUNAT=Serv er" piece from the
script tag.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #7
Roberta McGervey wrote:
I got the following code from MSDN to use as an example. So if I am
mixing to two languages it is because the MSDN is incorrect.
No, it's because your code is incorrect.

MSDN's code:
<SCRIPT LANGUAGE="VBScr ipt">


Your code:
<Script LANGUAGE=vbscri pt RUNAT=Server>


See the difference?

Actually, Stuart was incorrect: you are not mixing two languages. Your
mistake is attempting to use a server-side script block (RUNAT=Server) to
run code that can only run on the client.

This is the main obstacle to people attempting to learn to use asp (myself
included): learning the difference between server-side code and client-side
code. There are many asp tutorial sites out there (www.asp101.com, etc.)
that do a reasonable job of explaining the differennce better than i can do
in an email message.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7390
by: shank | last post by:
Can anyone give me some general ideas on why an error like Object doesn't support this property or method: 'ZoneRS.MoveFirst' comes up on a page? MoveFirst is a command to move to the first record... correct? thanks
3
11458
by: news.onetel.net.uk | last post by:
I and my friend Karl have spent literally all day trying to find out what is causing my error but we are zapped of any further functionality :) I have a form that adds news records. You select 'City' then you select 'Business Category' - now when you select 'Business Category' the next drop-down menu (business sub category) should populate...
54
4515
by: tshad | last post by:
I have a function: function SalaryDisplay(me) { var salaryMinLabel = document.getElementById("SalaryMin"); salaryMinLabel.value = 200; alert("after setting salaryMinLabel = " + salaryMinLabel.value); } I also have an asp.net object:
0
4519
by: fniles | last post by:
I created a CAB file for a 3rd party control (StockChartX) it using CABARC.exe that comes from Microsoft SDK. In the CAB file I included the StockChartX.ocx and StockChartX.INF. Then, I signed the CAB file using Verisign. I also created the LPK file for it (using LKPTool.exe). On my web page, I include the CAB file, and when I bring up that...
7
29740
by: stellstarin | last post by:
hi all, I have a HTML page with two forms. While trying to add a hidden element in a first form by the default javascript function, the error message 'object does not support this property or method 2146827850' Does any one know why this problem occurs?
5
550
by: John Olbert | last post by:
Subject: Error is Object doesn't support this property or method I am trying to pass a C# string under Vs2005 (Net2) to an Vb6 ActiveX Control. I get the following runtime error-- "Object doesn't support this property or method" Yet the Intellisense shows the following-- axMainViewJ1Obj1.AddFileJ1(ref string str);
2
2629
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
8
4185
by: Kevin Blount | last post by:
I'm tyring to access an object created by using a method from a third party API. The documentation tells me what object should be return, and the properties of that object, but when I try and access one of those properties I've shown an error message saying that the Object doesn't support this property or method. Here's the code I'm using...
0
8982
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the Recordset? Does the Recordset support Bookmarks? Can we use the Find and/or Seek Methods with this Recordset? Does the Recordset support the...
2
5710
by: thj | last post by:
Hi. I've got this form that I'm trying to validate: <form id="periodForm" action="" method="post"> <p> Periode: <input id="startDate" name="startDate" type="text" size="7" value="<%= ViewData %>" /> -
0
7512
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7438
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...
0
7707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
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...
0
6036
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5362
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...
0
5082
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...
0
3495
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
751
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...

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.