473,729 Members | 2,189 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

object does not support this property or method 2146827850

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?

Apr 25 '06 #1
7 29790
st*********@gma il.com said on 25/04/2006 10:13 PM AEST:
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,
What is 'the default javascript function'?

the error message 'object does not support this
property or method 2146827850'
Does any one know why this problem occurs?


Typically because you are attempting to use a method or property with an
object that doesn't support the method or property. Post a minimal
example that demonstrates the behaviour, then you'll get a more useful
response - maybe. ;-)
--
Rob
Group FAQ: <URL:http://www.jibbering.c om/FAQ>
Apr 25 '06 #2
RobG wrote:
st*********@gma il.com said on 25/04/2006 10:13 PM AEST:
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,

What is 'the default javascript function'?

the error message 'object does not support this
property or method 2146827850'
Does any one know why this problem occurs?

Typically because you are attempting to use a method or property with an
object that doesn't support the method or property. Post a minimal
example that demonstrates the behaviour, then you'll get a more useful
response - maybe. ;-)

Or load the page in FireFox and get a more meaningful error message...

--
Ian Collins.
Apr 25 '06 #3
Ian Collins wrote:
RobG wrote:
st*********@gma il.com said on 25/04/2006 10:13 PM AEST: <snip>
the error message 'object does not support this
property or method 2146827850'
Does any one know why this problem occurs?

Typically because you are attempting to use a method or property
with an object that doesn't support the method or property. Post a
minimal example that demonstrates the behaviour, then you'll get a
more useful response - maybe. ;-)

Or load the page in FireFox and get a more meaningful error
message...


It is often repeated that IE's error messages are a bit too obscure (and
constantly getting the line numbers off doesn't help much) but it is
maybe a little unfair as IE is at least consistent and once you are used
to its errors you can know what to look for when a particular error
appears.

For example, when IE complains "Object expected" it invariable means
that an attempt was made to call a function with an Identifier that
evaluated as Undefined or Null. That is a compliantly reasonable error
to generate as only functions can be called and functions are a sub-set
of objects so when JScript discovers that a value is not a reference to
an object there is no need to go on to worry about whether that objet
has a [[Call]] method, it can stop at the realisation that the value is
not an object, and announce that.

Granted, JavaScript(tm)' s "'something ' is not a function" is more
obvious, but you cannot debug IE specific script issues by trying code
that will take an entirely different branch in an alternative browser.
So learning to match IE's obscure messages with their causes is still a
good idea.

Richard.
Apr 26 '06 #4
Richard Cornford wrote:
Ian Collins wrote:
RobG wrote:
st*********@ gmail.com said on 25/04/2006 10:13 PM AEST:
<snip>
the error message 'object does not support this
property or method 2146827850'
Does any one know why this problem occurs?
Typically because you are attempting to use a method or property
with an object that doesn't support the method or property. Post a
minimal example that demonstrates the behaviour, then you'll get a
more useful response - maybe. ;-)


Or load the page in FireFox and get a more meaningful error
message...

It is often repeated that IE's error messages are a bit too obscure (and
constantly getting the line numbers off doesn't help much) but it is
maybe a little unfair as IE is at least consistent and once you are used
to its errors you can know what to look for when a particular error
appears.

I agree, but having another tool in the box helps. I assumed the OP was
a novice and hadn't mastered the art of interpreting IE's error messages.

--
Ian Collins.
Apr 26 '06 #5
hi all,
as the question was not clear to all, i am posting the question once
again.

I have a HTML page with two forms.
While trying to add a hidden element in a first form by the default
javascript functions, like createElemet & appendchild.

function addField (form, fieldType, fieldName)
{
if (!document.crea teElement) return;
var oInput = document.create Element('input' );
oInput.type = fieldType;
oInput.name = fieldName;
form.appendChil d (oInput);
}

the error message 'object does not support this
property or method' with the error number 2146827850 was displayed
when the code was put inside a
try...catch...
Does any one know why this problem occurs?

Apr 27 '06 #6
VK

st*********@gma il.com wrote:
hi all,
as the question was not clear to all, i am posting the question once
again.

I have a HTML page with two forms.
While trying to add a hidden element in a first form by the default
javascript functions, like createElemet & appendchild.

function addField (form, fieldType, fieldName)
{
if (!document.crea teElement) return;
var oInput = document.create Element('input' );
oInput.type = fieldType;
oInput.name = fieldName;
form.appendChil d (oInput);
}

the error message 'object does not support this
property or method' with the error number 2146827850 was displayed
when the code was put inside a
try...catch...
Does any one know why this problem occurs?


Difficult to say without seeing the page or at least the function call
(what are you feeding to addField). Just out of wild: are you sure that
you're sending form reference and not a string with form name?

Apr 27 '06 #7
st*********@gma il.com wrote:
hi all,
as the question was not clear to all, i am posting the question once
again.

I have a HTML page with two forms.
While trying to add a hidden element in a first form by the default
javascript functions, like createElemet & appendchild.

function addField (form, fieldType, fieldName)
{
if (!document.crea teElement) return;
var oInput = document.create Element('input' );
oInput.type = fieldType;
oInput.name = fieldName;
form.appendChil d (oInput);
}

the error message 'object does not support this
property or method' with the error number 2146827850 was displayed
when the code was put inside a
try...catch...
Does any one know why this problem occurs?

As I said, try FF, you will get the object name and line number in the
JavaScript console.

Is form a valid HTMLFormElement object?

--
Ian Collins.
Apr 27 '06 #8

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

Similar topics

18
3048
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of a single collections type, I should be proposing a new "namespaces" module instead. Some of my reasons: (1) Namespace is feeling less and less like a collection to me. Even though it's still intended as a data-only structure, the use cases...
3
11474
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...
54
4604
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:
6
2342
by: Luke | last post by:
Here is my emails to Danny Goodman (but probably he is very busy so he didn't answered it). First email(simple): Subject: JavaScript Arrays " We all know the array can act like HashMap, but is there a shortcut for creating such array ? eg //simple array indexed via numbers var a = new Array("a", "fdsf", "sada"); or,
12
8699
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press update after making changes, but I don't want that update button. How can I get the updated object when the user presses one of my other action buttons?
7
11950
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...
0
4528
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 web page, it asks to download it, and I download it. After the control is downloaded, I got an...
8
4196
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 (edited to protect the third party NDA) 1: <% 2: dim siteApi, userApi
0
9005
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 use of Indexes? Will the Absoluteposition property be able to be used on this Recordset? etc....
0
8931
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
9293
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
9221
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
8165
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
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
4536
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
4799
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3246
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.