Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Safari won't disable form elements.

Safari won't disable form elements.
Thread Tools
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status: Offline
Reply With Quote
Mar 30, 2005, 06:27 PM
 
For some reason in a web form I created, options in a <select> are selectable in Safari even thought I specified that they should be disabled.

For example, with the following code:
Code:
<select name="foo"> <option value="bar" disabled="disabled">bar</option> <optoin value="monkey">monkey</option> </select>
Both bar and monkey would show up as selectable in Safari even though in Firefox and Explorer bar is greyed out.

Is there some other way of marking it as disabled that will work for Safari?
     
Fresh-Faced Recruit
Join Date: Apr 2005
Location: Mpls, MN
Status: Offline
Reply With Quote
Apr 2, 2005, 02:47 AM
 
It depends how your are generating the form and what the criteria is for disabling certain options. If you are using a scripting language such as PHP, it would probably be best to have the PHP handle the options for the select. Otherwise, if it is a static HTML page I'm pretty sure Javascript can be used to remove options.

I'd say your best bet is to check out what Javascript can do in regards to manipulating selects.
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Apr 2, 2005, 01:16 PM
 
I thought it was just supposed to be "disabled" rather than disabled=disabled. Not too sure and can't check right now.

Code:
<select name="foo"> <option value="bar" disabled>bar</option> <optoin value="monkey">monkey</option> </select>
Travis Sanderson
     
Fresh-Faced Recruit
Join Date: Apr 2005
Location: Mpls, MN
Status: Offline
Reply With Quote
Apr 2, 2005, 02:05 PM
 
Originally posted by redJag:
I thought it was just supposed to be "disabled" rather than disabled=disabled.
It used to be ok to just have "disabled", but in the XHTML standard its disabled="disabled"
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2