PDA

View Full Version : Yahoo Autocomplete Error Event



eddyyanto
21 Dec 2006, 5:45 PM
I am not sure if this is the correct forum for me to post the autocomplete ui but I can't seem to find another yui forum.

Ok, now let's get back to the problem. I've been experimenting with the autocomplete and find it is quite usable and easy to integrate. Now I got one question, how do I fire a event for autocomplete? From the yui documentation I got.


dataErrorEvent
dataErrorEvent ( oSelf , sQuery )
Fired when the AutoComplete instance does not receive query results from the DataSource due to an error.

Parameters:
oSelf <Object> The AutoComplete instance.
sQuery <String> The query string.



It is apparently not clear what is the right syntax and the right way of calling this event.

Sorry once again if this is not the correct thread or forum to post this issue.

jarrod
21 Dec 2006, 6:08 PM
You'll need to 'subscribe' to the event.
Check out the examples provided by YUI on syntax and usage.

eddyyanto
21 Dec 2006, 9:30 PM
You'll need to 'subscribe' to the event.
Check out the examples provided by YUI on syntax and usage.

I have been crawling through the documentation and examples but sadly, it was unsuccessful.
Can someone point me to the right direction? A bit of constructive explaination would be fine, please do post the link of the example of *how* to subscribe to the event.

Thank you.

Regards,

-eddy-

tryanDLS
22 Dec 2006, 9:45 AM
You might try the YUI forum
developer.yahoo.com/yui

eddyyanto
22 Dec 2006, 4:00 PM
You might try the YUI forum
developer.yahoo.com/yui

Thanks, tryanDLS. I'll dig this stuff there. :)

jack.slocum
22 Dec 2006, 4:11 PM
yourAC.dataErrorEvent.subscribe(yourFunction);

eddyyanto
22 Dec 2006, 4:20 PM
yourAC.dataErrorEvent.subscribe(yourFunction);

Thanks, Jack. I think a better way of digging this beginner stuff should be at yui official discussion group. Now I know where I am heading for, thank you.

yourACDS.dataErrorEvent.subscribe(yourFunction)

where

yourACDS is your AutoComplete Data Source.