Adding Onfocus and onblur to inputbox

  • cheeshun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 4 months ago - 12 years 4 months ago #23667 by cheeshun
Adding Onfocus and onblur to inputbox was created by cheeshun
Hi,

I would like to add onfocus to one of my input box. Where can i find the file to do so?

One of my custom field textarea box
Eg of my code
<textarea name="eb_FemaleColoursSizes" rows="10" cols="0" class="inputbox" input type="text" value="E.g. 4 Pieces Order (Female Sizing) 2 Maroon, XL 1 Navy, S 1 Forest Green, M" onblur="if(this.value == '') { this.value='E.g. 4 Pieces Order (Female Sizing) 2 Maroon, XL 1 Navy, S 1 Forest Green, M'}" onfocus="if (this.value == 'E.g. 4 Pieces Order (Female Sizing) 2 Maroon, XL 1 Navy, S 1 Forest Green, M') {this.value=''}">E.g. 4 Pieces Order (Female Sizing) 2 Maroon, XL 1 Navy, S 1 Forest Green, M</textarea>
Last edit: 12 years 4 months ago by cheeshun.

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #23740 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding Onfocus and onblur to inputbox
Hi

I am afraid of you will have to edit the code (you will need to know PHP programming to edit the code). If you know programming, please look at the file components/com_eventbooking/helper/fields.php, find the function function _renderTextarea and customize the code to make it works in the way you want.

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc