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? 7 29762 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>
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.
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.
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.
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? 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? 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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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:
|
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,
|
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?
| |
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...
|
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...
|
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
|
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....
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |