473,406 Members | 2,387 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,406 software developers and data experts.

disable=true

I hope someone can help with this problem:

I have a perl cgi form that has a popup_list. Based on a value that
is coming in from a database query, I want to either
1) display the value (from the databse) and let the user change it;
OR
2) display the value (from the database), but NOT let the user change
it.
I tried using javascript to disable the popup list, and that works,
except the form "loses" the value of the entry in the popup list.

Maybe "disable" is not the correct property I want to use. If that is
the case, what is it?

Thanks,
Shirley

Feb 27 '07 #1
1 2909
On Feb 27, 1:14 pm, secndChildh...@yahoo.com wrote:
I hope someone can help with this problem:

I have a perl cgi form that has a popup_list. Based on a value that
"popup list"? I think you mean select element.
is coming in from a database query, I want to either
1) display the value (from the databse) and let the user change it;
OR
2) display the value (from the database), but NOT let the user change
it.
I tried using javascript to disable the popup list, and that works,
except the form "loses" the value of the entry in the popup list.

Maybe "disable" is not the correct property I want to use. If that is
the case, what is it?
If you meant input element, you are after the readonly property - it's
an HTML feature, not javascript.

<URL: http://www.w3.org/TR/html4/interact/...#adef-readonly >

If you mean that you have a select element and you want to set the
selected option and either:

1. let the user change the selected option, or

2. prevent the user changing the option.
1. can be achieved by setting the appropriate option's selected
attribute in the source HTML, or using script to set the select's
selectedIndex property to the appropriate value, or setting the
appropriate option to selected=true.

2. can only be reliably achieved by removing all the other options.
--
Rob

Feb 27 '07 #2

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

Similar topics

32
by: Mark Johnson | last post by:
You have an, a, anchor with href link. Can you use a stylesheet to effectively disable the link, so that you can't click on it; that it will appear simply as text?
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>
2
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. ...
3
by: Jeff | last post by:
I have a payment form with a submit button. A large percentage of users double-click the submit button thus submitting their payment information twice. I would like to use javascript to disable...
4
by: Steve | last post by:
As you know there is a databindings property 'Enabled' for fields in the gridview. In the custom binding section I have used the expression: Eval("myfield"). 'myfield' is a boolean field I have...
5
by: Ike | last post by:
Does anyone know how to disable a list box element in VB 6 ? Thanks Ike
1
by: srinivasyadavkota | last post by:
Hi Experts here, Pls help. when I disable the button using the code document.getElementById("mybutton").disable=true; it is disabling perfectly but when the page gets refreshed again it...
2
by: nudrat | last post by:
Hi All, I have two groups of radion button sets. based on selection of one group made the other group radio buttons disable. suppose some one has selected one radion button from a group, so one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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...
0
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...
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...

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.