Hi,
I need to show the tooltip to let user pick up the right choice after he fills an input text. When the user focus on that field the very first time, tooltip does not exist yet. It will be shown after he blurs away, the value is picked up by a func that does some ops, fill the 'tooltip2show' div with these results and than shows the tootip.
This is html and js codes:
It works fine for the first time the tooltip is shown. If the users edit the input field again, change that value, blur from the field, I have this error message and the tooltip wont show again:
Error: this[0].ownerDocument is undefined
Source:http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js
Row: 31
These is getting me crazy from the whole day and can't find a way. I've tried putting the inizialization on other lines, tried onBeforeShown and onShow call backs to get the moment where the tooltip will show or hide, but I can't figure out how to fix and have the tooltip show again after the first time.
Regards and thanks in advance for any advice.
Robert.
I need to show the tooltip to let user pick up the right choice after he fills an input text. When the user focus on that field the very first time, tooltip does not exist yet. It will be shown after he blurs away, the value is picked up by a func that does some ops, fill the 'tooltip2show' div with these results and than shows the tootip.
This is html and js codes:
<input id="myfield" name="blabla" onblur="myfunc()">
<div id="tooltip2show"></div>
var tp=null;
function myfunc(){
//do something to pick some options based on user text and put into div
$('#tooltip2show').html('some options for the user: a) <span onlick="closeMe()">opt1</span> <br> b) <span onlick="closeMe()">opt2</span> ');
tp = $('#myfield').tooltip();
tp.show();
//this prevents from showing the tooltip while the user is re-editing the field
$("#myfield").unbind("focus");
$("#myfield").unbind("mouseover");
}
function closeMe(){
tp.hide();
}
It works fine for the first time the tooltip is shown. If the users edit the input field again, change that value, blur from the field, I have this error message and the tooltip wont show again:
Error: this[0].ownerDocument is undefined
Source:http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js
Row: 31
These is getting me crazy from the whole day and can't find a way. I've tried putting the inizialization on other lines, tried onBeforeShown and onShow call backs to get the moment where the tooltip will show or hide, but I can't figure out how to fix and have the tooltip show again after the first time.
Regards and thanks in advance for any advice.
Robert.
