Hello,
I've sound some other discussions in the forum on not posting back with a client search, but, I'd like it to leave the drop down open. This happens if the client search function throws an error, so I feel like there should be a way to tell it to cancel and not close the results box. Here's what I have right now:
This actually works very nicely as a way to make it so that, if they haven't selected a result, it won't post back. But, when people hit "enter", the results still close, and that confuses some folks. Is there a way to safely cancel the post and leave the box open? Basically, some line I could add after the "_postBackOnSearch = false;" bit?
Thanks,
Mike
I've sound some other discussions in the forum on not posting back with a client search, but, I'd like it to leave the drop down open. This happens if the client search function throws an error, so I feel like there should be a way to tell it to cancel and not close the results box. Here's what I have right now:
function
txtAutoSearch_Search(sender, args) {
if
(args.get_value() ==
null
) {
sender._element.control._postBackOnSearch =
false
;
}
else
{
sender._element.control._postBackOnSearch =
true
;
}
}
This actually works very nicely as a way to make it so that, if they haven't selected a result, it won't post back. But, when people hit "enter", the results still close, and that confuses some folks. Is there a way to safely cancel the post and leave the box open? Basically, some line I could add after the "_postBackOnSearch = false;" bit?
Thanks,
Mike