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
We have only "onchange" event handler for Lookup fields due to complexity of this UI component.
Pavel is correct. If you really want to you can add your own JavaScript to the page to find this element and add event handling code to it.
Martin may have some suggestions for you on the actual implementation, he has had great suggestions on this kind of thing so far
Matt
Hi All,
Here you go, this should work for the browsers IE7+, FF and Chrome
Just assign the function to your lookup's onchange.
You we're just probably missing the checker for the value of your lookup field that's why you weren't able to identify if there was an item loaded or not.
I used - if (lookupvalue != '' && lookupvalue != null) - you can change this anytime. ^_^
The good thing about lookups is that if you retrieve their value onchange (removing items is considered and onchange) you will get the actual value of the field. I used rbf_getFieldValue fo
HTML was stripped by getsatisfaction, kindly remove the HTML comments for this to work :)
HTML was stripped by getsatisfaction, kindly remove the HTML comments before and after the script tags for this to work :)
Thanks Martin :)