Lock a text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anybody please help me, I am trying to add text to a text box which I
have done but I need it to be locked so that it cannot be altered. Any clues
please?
 
Cannot be altered by who? If it's another editor using FP, then you could
make a DWT and have that text box be part of the non-editable region. If
it's a form on the web, then you would just need to add the readonly
attribute to the tag -

<textarea ... readonly="readonly">Try as you might, this text can not be
changed</textarea>
 
What is the purpose of using this text box, instead of just inserting the text on the page?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Sorry, but while HTML provides a disabled="true" attribute that's supposed to
do this, not all browsers support it.

If you would explain in grater detail what you're trying to do, perhaps
there's another way of creating the same effect.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*-----------------------------­-----------------------
|\----------------------------­-----------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||----------------------------­-----------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/----------------------------­-----------------------
*-----------------------------­-----------------------
 
readonly works pretty well, Jim - it's HTML4, and is supported in NN6+ and
IE4+. Disabled has the same support matrix, but the potential disadvantage
that it reduces the opacity of the box making it harder to read, perhaps.
 
In effect it 'greys out' the form field (it's OK for fields like form
buttons, and check boxs, radio buttons; but not so much text box types with
text in them).
 
Back
Top