Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 10th, 2002, 04:20 AM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 50 sec
Reputation Power: 17
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
Unchangable Form input box

How would I make a input field uneditable so the value inside is grayed out?
__________________




"Only Linux users see the end of crashes."
- Pl4t0

Reply With Quote
  #2  
Old July 10th, 2002, 06:38 AM
dgibson dgibson is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Urbana, MD, USA
Posts: 66 dgibson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
<input ... disabled> makes it greyed out and not selectable, but I think it also does not pass a value on submission either.

<input ... readonly> does pass the value, which cannot be changed (by hand).

Note neither of these attributes work in Netscape 4 and older browsers and neither are secure from hacking/tampering in IE ad likely other browsers.

Reply With Quote
  #3  
Old July 10th, 2002, 09:16 AM
Lindset Lindset is offline
weirdomoderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Alta, Norway
Posts: 370 Lindset User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
Send a message via ICQ to Lindset Send a message via AIM to Lindset
In case you just want to show something to people, you better not process and insert the data from the "disabled" input-field.. I'm sure you already thought of that, though..
__________________
Best Regards,
Håvard Lindset

Reply With Quote
  #4  
Old July 10th, 2002, 09:29 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,240 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 18
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Why just use a regular cell and output the data to that cell:

<td>$data</td>

This way it's displayed, but it cannot be edited by the user.
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #5  
Old July 10th, 2002, 01:18 PM
dgibson dgibson is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Urbana, MD, USA
Posts: 66 dgibson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
of course that way is the standard/common way to display information that you don't want edited or updated in your database, but the original mquestion didn't state what it was for...

If that is the intention, then just displaying the text is a much more secure way of showing the information and making it non-editable. On the other hand, if there is a need to dynamically toggle the disabled or read-only attribute based on some other form conditions, it's easier to use a form field from the start.

Reply With Quote
  #6  
Old July 10th, 2002, 07:18 PM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 50 sec
Reputation Power: 17
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
yup, thanks guys. got it working. I could just do it the conventional way and just make it print, however I feel putting it in a form box makes it look cooler, in my opinion.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Unchangable Form input box


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap