473,606 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

runtime error: object doesn't support this property or method

I tried to display all html control types in the form. But it has run
time error
"object doesn't support this property or method" on
document.write( obj.type);

Even I do document.write( 'hello world'); it still has the same error.
function clearForm()
{ var i=0;
for (i=0; i<InputForm.ele ments.length-1; i++)
{ var obj = InputForm.eleme nts[i];
document.write( obj.type); //runtime error: object doesn't support
this property or method
}
}

any ideas?? thanks!!
Jul 23 '05 #1
3 3464
Lee
Matt said:

I tried to display all html control types in the form. But it has run
time error
"object doesn't support this property or method" on
document.write (obj.type);

Even I do document.write( 'hello world'); it still has the same error.
function clearForm()
{ var i=0;
for (i=0; i<InputForm.ele ments.length-1; i++)
{ var obj = InputForm.eleme nts[i];
document.write( obj.type); //runtime error: object doesn't support
this property or method
}
}


Don't use document.write( ) for debugging. As soon as you write
anything to a document that has already been displayed, you
clear the current contents. That means that on the second time
through the loop, your form is gone.

Use alert(), unless you have dozens of fields.

Also, your loop is missing the last form element. That may be
what you want if you know that the last element is your submit
button. Otherwise, your loop should be:
for(i=0; i<InputForm.ele ments.length; i++)

Jul 23 '05 #2
voir typeOf

http://msdn.microsoft.com/library/de...tBelongsTo.asp

Matt a écrit:
I tried to display all html control types in the form. But it has run
time error
"object doesn't support this property or method" on
document.write( obj.type);

Even I do document.write( 'hello world'); it still has the same error.
function clearForm()
{ var i=0;
for (i=0; i<InputForm.ele ments.length-1; i++)
{ var obj = InputForm.eleme nts[i];
document.write( obj.type); //runtime error: object doesn't support
this property or method
}
}

any ideas?? thanks!!


Jul 23 '05 #3
Lee
G Roydor said:

voir typeOf

http://msdn.microsoft.com/library/de...tBelongsTo.asp


No. He's trying to access the "type" field of form controls.

Jul 23 '05 #4

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

Similar topics

3
11465
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 with 'Business Sub-categories' related to the 'Business Category' but once 'Business Category' is...
2
3793
by: SmittyBroham | last post by:
Hello, I have a function that loops through 2 select lists and records the values of any hi-lighted options a user would have selected. It then sets 2 corresponding "hidden" form elements to the values and submits the form data to the server. I was error free until I added the following line: document.myform.submit();
0
2123
by: Roman | last post by:
I'm trying to create the form which would allow data entry to the Client table, as well as modification and deletion of existing data rows. For some reason the DataGrid part of functionality stops working when I include data entry fields to the form: I click on Delete or Edit inside of DataGrid and get this error: "Error: Object doesn't support this property or method" If I remove data entry fields from the form - DataGrid allows to...
6
2372
by: Bill Patel | last post by:
I am getting Runtime error on line 50. Please Help. Thank You Bill 1 <%@ Page Language="VB" %> 2 <%@ import Namespace="System.Data" %> 3 <%@ import Namespace="System.Data.SqlClient" %> 4 <script runat="server"> 5
7
11934
by: Martin Robins | last post by:
I am currently looking to be able to read information from Active Directory into a data warehouse using a C# solution. I have been able to access the active directory, and I have been able to return "DirectoryEntry" objects within the path that I specify (either using the DirectoryEnrtry.Children or using the DirectorySearcher class) and all started well and dandy! Now the problem; some of the properties of the DirectoryEntry objects being...
2
3772
by: serviceman via AccessMonster.com | last post by:
Me Again, I just imported a working project from an SQL server based setup to an Access based setup, and now this code is giving me a 'runtime error 438 not defined' message : Private Sub Combo108_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs = Me.Recordset.Clone
4
1523
by: Cylix | last post by:
Sample code of the problem: function inputOne() { alert('a'); } <input name="inputOne" id="inputOne" value="Warn" onclick="inputOne()"> The error is the object doesn't support this method.
3
9776
by: Peachstone | last post by:
I'm using Windows XP and MS Access 2002. I am trying to write code in VB which is attached to a text control on a form called "Scripture1". I have another text control on the same form called "Scripture1Means" on which the control visible property is set to "No". On the "On Got Focus" event of the control, "Scripture1", I have wrtten the following VB: Private Sub Scriptures_GotFocus() If Me!Scripture1Means.Visible = False Then ...
21
3820
vikas251074
by: vikas251074 | last post by:
I am getting error while entry in userid field. When user enter his user id, an event is fired immediately and user id is verified using AJAX method. But I am getting error 'Object doesn't support this property or method'. <form name="myform" action="main.asp" method="post"> <div id="content"> <h2 id="pageName">Main Page</h2> <div class="feature"> <h1>Surfing the intranet </h1> <p> This is a comprehensive information...
0
8024
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7959
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
8449
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8432
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
8105
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
3942
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3987
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1305
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.