473,698 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.F ield.disabled = true;
What is needed to make it work in all 3 browsers ?
Jun 27 '08 #1
2 2114
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.F ield.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.de mon.co.uk>
Jun 27 '08 #2
Kim
On May 15, 12:18 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.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.F ield.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$8 300d...@news.de mon.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
9736
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 in my asp form i use a checkbox and fot he other field i use a normal text box. if the yes/no field is checked then the other field is enabled otherwise it has to be disabled.Here's what i've done so far: Do While Not ObjRS.EOF <td><input...
2
1525
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 (form/querystring) I can't retrieve that button value... Is there any trick to do this? Like https://www.cuworld.com/ webpage... Try to register as a free user membership and after click the submit button check what hapend... They
5
5980
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 disactivate other checkboxes. How can I do this ? here is the code:
12
8876
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
2318
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 products and check the No radio button for all the products. In javascript, that is easy enough. When the No radio button is clicked, I have to put '0' in the Product-Qty text input, and disable the Product-Qty text input. I create an array of...
4
3203
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 search a parent element(in my case a <table>) and search for elements of a certain type (<input>, <textarea>, etc) and perform operations on them. I've done some initial googling and found PLENTY of samples of disabling all form items, but I...
9
10283
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 like to either disable or find a work around for. Background: I have a form that has 3 input type="text" fields. The fields are Quantity, Amount and total. OnKeyUp is used when you enter something in Quantity or Amount to trigger a javaScript...
3
2496
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" action="teams_process.php" method="post" onSubmit="validate()"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width='75'><span class='Body'>Team Name:</span></td> <td width='150'><input width="150"...
10
5089
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" onchange="Form()">
3
3242
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 searches for scripts and html and adapted them. I need to know the principles of how to disable certain options based on other selections within the form. I have attached my script and html below to help. For example of a customer selects (BASIC...
0
8674
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
9157
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
9023
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...
0
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7721
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...
0
5860
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();...
0
4366
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...
1
3045
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
3
1999
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.