How do I attach a javascript function on everytime I remove

Posted by Rollbase User on 05-Dec-2011 21:46

For example, I selected an employee from the lookupfeield. I put a javascript function onchange ( hiddenchange attribute), then I hide the textbox element of the lookup. What I want to do next is to put a javascript function to show the textbox element once I removed the selected employee... I tried attaching jquery to the span tru its attribute inputname or to the img via its alt='Remove' but I can't catch it. Please help me ... thank you

All Replies

Posted by Admin on 01-Apr-2012 19:32

Hi,



You don't have to use jQuery to do this.

Just use rbf_getFieldValue('lookup_fieldname') and check if it has a value or not.

Probably something like:



if (String(rbf_getFieldValue('lookup_fieldname')).length > 0 || rbf_getFieldValue('lookup_fieldname') == '') {

// code here.

}



Hope this helps,

Piscoso Martin

Rollbase

This thread is closed