User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Mar 2008
Posts: 79
Reputation: justinmyoung is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
justinmyoung justinmyoung is offline Offline
Junior Poster in Training

simple html form driving me nuts

  #1  
Jun 6th, 2008
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!
Last edited by justinmyoung : Jun 6th, 2008 at 7:29 pm. Reason: typo
Attached Files
File Type: php search_problem.php (26.6 KB, 2 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 79
Reputation: justinmyoung is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
justinmyoung justinmyoung is offline Offline
Junior Poster in Training

Re: simple html form driving me nuts

  #2  
Jun 6th, 2008
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.
Reply With Quote  
Join Date: May 2008
Location: Hyderabad, India
Posts: 245
Reputation: sreein1986 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 27
sreein1986's Avatar
sreein1986 sreein1986 is offline Offline
Posting Whiz in Training

Re: simple html form driving me nuts

  #3  
Jun 7th, 2008
please send me the code

Thanx,
sree
Thanx,
Sreekanth

www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 347
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 68
buddylee17's Avatar
buddylee17 buddylee17 is online now Online
Posting Whiz

Re: simple html form driving me nuts

  #4  
Jun 7th, 2008
You want something like this? This textbox clears when the user clicks it.
  1. <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.
Reply With Quote  
Join Date: Mar 2008
Posts: 79
Reputation: justinmyoung is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
justinmyoung justinmyoung is offline Offline
Junior Poster in Training

Re: simple html form driving me nuts

  #5  
Jun 9th, 2008
Thanks very much. That works great!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 9:49 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC