Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old November 19th, 2001, 01:48 PM
johnstell johnstell is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Manchester, Uk
Posts: 31 johnstell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 15 sec
Reputation Power: 7
Question clearing input text boxes

if there is text(ie the value is "some text here")in a text box on a html form how do you clear it when the mouse is clicked inside it?

Reply With Quote
  #2  
Old November 19th, 2001, 02:30 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 17
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
this thread belongs to html/js forum, sample of what you want is
<form name=myform>
<input name=a value=hello onClick="document.myform.a.value=''";>
</form>
__________________
And you know I mean that.

Reply With Quote
  #3  
Old November 20th, 2001, 06:14 PM
johnstell johnstell is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Manchester, Uk
Posts: 31 johnstell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 15 sec
Reputation Power: 7
i tried it but it gave me an error on the form inboth netscape and in ie

Reply With Quote
  #4  
Old November 20th, 2001, 06:18 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 17
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
dunno...works fine for me

Reply With Quote
  #5  
Old November 20th, 2001, 07:16 PM
Humble Seeker Humble Seeker is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: London
Posts: 69 Humble Seeker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 54 sec
Reputation Power: 7
Try this instead
<form name=myform>
<input name=a value=hello onFocus="document.myform.a.value=''";>
</form>
I have no idea why Al's code didn't work, it should have, but I also had trouble in NS4.75 and with Opera 5.12.
__________________
Humble Seeker

The longest journey starts with the smallest step, and knowledge is the longest journey of all.

Reply With Quote
  #6  
Old November 20th, 2001, 07:49 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 17
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
could be that last ; ....

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > clearing input text boxes


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway