•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 391,991 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,253 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 365 | Replies: 4 | Solved
![]() |
•
•
Join Date: Mar 2008
Posts: 79
Reputation:
Rep Power: 1
Solved Threads: 0
Hi
I'm having trouble with a simple html form. I'm trying to have the input box read a simple message, such as "enter ticket number here", and allow the user to click anywhere within the input box to clear the message and begin entering their number.
The two problems I'm having, and I have no idea why, is
#1 clearing the message when a user clicks anywhere within the box
#2 allowing the user the ability to click anywhere within the box
I can get it to work outside the page that it's in now, but within the page it doesn't work at all.
I attached the file below
Thanks for any help!
I'm having trouble with a simple html form. I'm trying to have the input box read a simple message, such as "enter ticket number here", and allow the user to click anywhere within the input box to clear the message and begin entering their number.
The two problems I'm having, and I have no idea why, is
#1 clearing the message when a user clicks anywhere within the box
#2 allowing the user the ability to click anywhere within the box
I can get it to work outside the page that it's in now, but within the page it doesn't work at all.
I attached the file below
Thanks for any help!
Last edited by justinmyoung : Jun 6th, 2008 at 7:29 pm. Reason: typo
•
•
Join Date: Mar 2008
Posts: 79
Reputation:
Rep Power: 1
Solved Threads: 0
Not two minutes after I posted this, I figured the problem out. I had an extra div tag that was covering the input box and only allowing the top portion of the box to be clicked in. I spent three hours on that one. fun stuff.
But the basic problem of clearing the text within the input box when a user clicks within it, I still don't know how to solve. If someone could help me with that one, I'd appreciate it.
But the basic problem of clearing the text within the input box when a user clicks within it, I still don't know how to solve. If someone could help me with that one, I'd appreciate it.
•
•
Join Date: May 2008
Location: Hyderabad, India
Posts: 245
Reputation:
Rep Power: 1
Solved Threads: 27
please send me the code
Thanx,
sree
Thanx,
sree
Thanx,
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
You want something like this? This textbox clears when the user clicks it.
html Syntax (Toggle Plain Text)
<input type="text" onfocus="this.value=''; this.onfocus=null;" name="notes" value="enter ticket number here" />
Last edited by buddylee17 : Jun 7th, 2008 at 1:23 am.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
- Previous Thread: CSS Div help needed
- Next Thread: Differences in CSS (IE6 vs IE7 and Firefox)


Linear Mode