/    Sign up×
Community /Pin to ProfileBookmark

TextBox – making it un clickable and typable

Hi,
I have actually created a textfield which is used to display error msg using onFocus. But the con of it is if user accidentally click on the white area so called inivisble textfield, he can type on it and thus led to confusion..just wondering if there is any codes that can disable the textfield being type or click by user but allow me to display msg on it.

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliAug 02.2004 — something like this will work

<input type="text" name="t1" readonly="readonly"/>
Copy linkTweet thisAlerts:
@terry81authorAug 03.2004 — Hi Khalid Ali,

Thanks for the code. Didnt know there is actually such a code for that. Is it a new code?


Thanks =)
Copy linkTweet thisAlerts:
@shortiee4Aug 03.2004 — to save a little bit of time ,not too much, but you can just type readonly by itself, you don't need to put: readonly="readonly".
Copy linkTweet thisAlerts:
@fredmvAug 03.2004 — [i]Originally posted by shortiee4 [/i]

[B]to save a little bit of time ,not too much, but you can just type readonly by itself, you don't need to put: readonly="readonly". [/B][/QUOTE]
Under XHTML you certainly do.
×

Success!

Help @terry81 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...