Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 01-06-2011, 04:57 PM   #1
Beta Member
 
Join Date: Aug 2010
Posts: 2
Default Huge HTML/XHTML/CSS/JAVASCRIPT NOOB

This is probably the simplest thing ever for you guys. But I am trying to get into web design.

So here is what I am trying to do. I have two textboxes and i want the text inside the textbox to disappear when it is clicked, but I want it to reappear when the other textbox is clicked

Original Page

a) [Username] b) [Password]

If a is clicked.

a) [ ] b) [Password]

if b is clicked.

a) [Username] b) [ ]

if anywhere else on the page is clicked.

a) [Username] b) [Password]


Soo. that being said, here is what I have so far.

<html>

<p>

<br />
<input type="textbox" onclick=value="" value="Username" />
<br />
<br />
<input type="textbox" onclick=value="" value="Password" /> </p>

</html>
__________________

fubu05 is offline   Reply With Quote
Old 01-06-2011, 05:31 PM   #2
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Huge HTML/XHTML/CSS/JAVASCRIPT NOOB

Have a look here: Text box onclick event handling: removing default data

You'll need javascript to do this, but it's simple enough
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 10:14 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0