• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: On Click colour values

On Click colour values 14 years 2 months ago #12718

  • reders
  • reders's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
Please help,
I have created a form and I am using the commands:

onfocus="if(this.value == 'First Name') this.value ='';"
onblur="if(this.value == '') this.value='(First Name)'"

for the input fields and this is working fine.

What I would like to happen is the default value colour is #ddd and then when the user clicks in the input box the text is then #000.

Is this possible?

If so please can you tell me how to do it?

Regards,
Sean R.
The administrator has disabled public write access.

Re:On Click colour values 14 years 1 month ago #12840

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 745
  • Thank you received: 66
Hello,

In order to change the color of the font when the field is focused you could try using:
onfocus="if(this.value=='default_value') {this.value=''; this.style.color='#000';}"
onblur="if(this.value=='') {this.value='default_value'; this.style.color='#ddd';}"
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 14 years 1 month ago by andreic.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!