|
#11
|
|||
|
|||
|
Okay, I found a problem with using that. After you have typed something in a text box then clicked off, it goes grey and itallic, then say, if you made a mistake and you clicked back in there, the whole thing would delete, is there anyway to stop this?
Cheers. Andy |
|
#12
|
||||
|
||||
|
Yes, there is. But before I make the code, do you want it to turn back to grey? Or just stay black?
__________________
|
|
#13
|
|||
|
|||
|
I want it to be grey before you enter anything, then when you click on it and enter stuff to be black, then, when you click off that for it to stay black.
Cheers, Andy. |
|
#14
|
||||
|
||||
|
Ok:
Code:
style="font-style: italic;color: grey;" onfocus="this.style.fontStyle='normal';this.style.color='black';if(!a){this.value=''};" onchange="a = true;"
Code:
<script type="text/javascript"> var a = false; </script>
__________________
|
| The Following User Says Thank You to Nile For This Useful Post: | ||
Andyroo123 (11-07-2009) | ||
|
#15
|
|||
|
|||
|
ThankYou MUCHLY
|
|
#16
|
||||
|
||||
|
Just a note, 'grey' is not a valid css color name in all browsers, just some. Use 'gray' instead.
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
| The Following User Says Thank You to jscheuer1 For This Useful Post: | ||
Andyroo123 (11-07-2009) | ||
|
#17
|
||||
|
||||
|
Good point! Here:
Code:
style="font-style: italic;color:
__________________
|
| The Following User Says Thank You to Nile For This Useful Post: | ||
Andyroo123 (11-07-2009) | ||
|
#18
|
|||
|
|||
|
Thanks guys, much appreciated
|
|
#19
|
||||
|
||||
|
Glad to help! Now change the topic to resolved.
__________________
|
| The Following User Says Thank You to Nile For This Useful Post: | ||
Andyroo123 (11-07-2009) | ||
|
#20
|
|||
|
|||
|
Oh yeah, my bad, I went out after you replied
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|