473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Disable form input in IE7

Kim
I have a problem with IE7.

In Firefox2 and IE6 can I disable an input field in a form without any
problems, yet it doesnt work in IE7.
I havent seen this reported before.

Code:
document.Form.Field.disabled = true;
What is needed to make it work in all 3 browsers ?
Jun 27 '08 #1
2 2093
Kim wrote:
I have a problem with IE7.

In Firefox2 and IE6 can I disable an input field in a form without any
problems, yet it doesnt work in IE7.
Are you sure? WFM, although the background color does not change automatically.

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET
CLR 2.0.50727)
I havent seen this reported before.

Code:
document.Form.Field.disabled = true;
You better use the standards-compliant syntax:

document.forms["Form"].elements["Field"].disabled = true;
What is needed to make it work in all 3 browsers ?
That depends on which of the many other browsers out there you consider the
third one.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Jun 27 '08 #2
Kim
On May 15, 12:18 pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
Kim wrote:
I have a problem with IE7.
In Firefox2 and IE6 can I disable an input field in a form without any
problems, yet it doesnt work in IE7.

Are you sure? WFM, although the background color does not change automatically.

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET
CLR 2.0.50727)
I havent seen this reported before.
Code:
document.Form.Field.disabled = true;

You better use the standards-compliant syntax:

document.forms["Form"].elements["Field"].disabled = true;
What is needed to make it work in all 3 browsers ?

That depends on which of the many other browsers out there you consider the
third one.

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300d...@news.demon.co.uk>
I did mention all 3 browsers (IE6, IE7 and Firefox).

But turns out the problem was a human error :(
I had forgotten to call the function in which the above line was used.
So WFM too after all :)
Jun 27 '08 #3

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

Similar topics

2
by: HolaGoogle | last post by:
Hi all, Can you please tell me what's wrong with my code??? i do have this database in wich i have to field.One is a "yes/no" field and another one is "number" field. To display the yes/no field...
2
by: Bruno Alexandre | last post by:
Hi guys, If I want to block a user to change a form after submiting, I add a function that will disable the submit button, but when I'm getting the form collection (using post or get...
5
by: Bob Bedford | last post by:
I create checkboxes using datas from a database (with PHP). I store all values in an array, as I must pass this value like a Form value. Now, in some cases, when a checkbox is selected, I must...
12
by: Forti2ude | last post by:
Hello, I have a simple form... <form> <select name="foo" multiple> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> </select>
6
by: Mike | last post by:
I have a form that contains 240 "products". Each Product has a TR. Each TR contains a Yes and No radio button and a Product-Qty text input. A situation exists where I have to go through all the...
4
by: SteveKlett | last post by:
I have a subset of form items that I need to perform different operations on (enable/disable, clear values, change style, etc) rather than hard code the IDs or names I would like to recursively...
9
by: surf_doggie | last post by:
Im not sure if this is the group to post in, if anyone knows a more appropriate one please let me know. Please consider the following example of a feature most all browsers have that I would...
3
w33nie
by: w33nie | last post by:
I want to disable the text boxes, captain_name and captain_email, but only if the radio button, captain_guarantee, has NOT been checked. how do i do this? <form name="formTeamApplication"...
10
by: viki1967 | last post by:
Disable/enable icon.gif Hi all. I have this form in the page.htm: <form action="form.asp" method="post" onsubmit="return(validateForm(this));"> <select size="1" name="t_im"...
3
by: Venturini | last post by:
I am trying to put together a web page where the customer makes choices of products and is then given a total. I am extremely new to Javascript and have managed to get as far as I have from web...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.