473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,385 developers and data experts.

Browser Bug: 'Object does not support property' error when setting form action (IE6)

acoder
16,027 Expert Mod 8TB
Problem
When setting the FORM object's action property an "Object does not support this property or method" error occurs

Browser
Internet Explorer 6-

Example
The Javascript code:
Expand|Select|Wrap|Line Numbers
  1. var theForm = document.getElementById("formID");
  2. theForm.action = "actionpage.php";
  3. theForm.submit();
Some relevant HTML:[HTML]<input name="action" type="submit" ...>[/HTML]
Solution
This is caused by using the name "action" for the submit button which causes IE to be confused between the submit button object and the form's action property. The solution is to rename the submit button (or whatever button or element you have named with a form property).

It's a bad habit to use reserved words for naming objects anyway.

More Bugs, Quirks and Inconsistencies
Aug 18 '07 #1
0 8217

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

Similar topics

3
by: What-a-Tool | last post by:
Have a school project in which I have to use an ASP page to process data from a form submitted by a user. Have to do this 3 ways - Using a Function, a Sub Procedure, and a Class. Simple enough. ...
2
by: TC | last post by:
Hey Folks, While coding in VBA, I had been receiving script errors when attempting to utilize the online help from within the VBA IDE. After fiddling with security settings and much searching...
0
by: Eric B | last post by:
Hi. I'm trying to set the background of a form from a file with this code : Stream imgStream= File.Open("images\\popupbackground.jpg",FileMode.Open, FileAccess.Read, FileShare.Read);...
0
by: Jeremy Chapman | last post by:
In an asp.net page, I'm creating an exchange account. I've created the account, and tied it to a primary NT account. Now I'm trying to assign permissions to it but I get an error of "The...
1
by: effendi | last post by:
Hi I downloaded MSDE2005 and I tried to set up an ODBC connection to a database I created. I can see the database using client but I got this error through the ODBC manager An error has occurred...
0
by: SteMc | last post by:
I have one browser named "Main_Browser" and a second named "Secondary_Browser". I can set the height and width of the first wonderfully. I have a menu item that when pressed attempts to set the...
1
by: monudjn | last post by:
Hi I am implementing ajax in portal. Using ajax i am able to updating the content of portlets asynchronously. However i am facing a problem The Problem: While submitting the form i am getting...
2
DonRayner
by: DonRayner | last post by:
This one has me stumped. I'm getting a "Type Mismatch" error on one of my forms when it's being opened. It's hapening before the forms "On Open" event, I stuck a msgbox in there to check and I'm...
3
by: aleseus | last post by:
New to the forum, so thanks for having me. I'm submitting a form, and attempting to save it to a local copy of an ACCESS 2007 database. When I am submitting the form, I get the following error: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.