I hava form the displays X icons for empty fields submitted and I want to show tooltip messages on the X icons. I am using this code and nly the last button works... What am I doing wrong?
<script type="text/javascript">
//launch toltip error messages.
tooltip.pop("ico_frm_error_01", "<h3>Hi</h3>, there");
tooltip.pop("ico_frm_error_02", "<h3>Hi</h3>, there");
tooltip.pop("ico_frm_error_03", "<h3>Hi</h3>, there");
</script>
Yes I tried that. The button ids are unique and are rendered exactly just like mentioned above. Only one will fire...
Example:
<img src="/media/images/gui/icons/ico_32_error.png" name="ico_frm_err_03" width="32" height="32" class="datainput_icons" id="ico_frm_err_03">
Another example (same outcome):
<img src="/media/images/gui/icons/ico_32_error.png" name="ico_frm_err_03" width="32" height="32" class="datainput_icons" id="ico_frm_err_03" onLoad="tooltip.pop(this, 'Invalid CAPTCHA code.<br>Please enter the code you see in the picture.<br>This helps us verify that you are not an automated program.')">
I tried using the methods above but only one onload funstion will fire. I even wrapped the same code in a jquery $(document).ready(function() and I am getting the same outcome. Almost every other on event works fine like mouseover and click, but not onload. I tried putting the same commands onload on one line in the body tag and the same outcome again! This is driving my nuts.
Well, at the end I gave up and used another solution and it worked fine. Too bad I can only use one instance onload. I really liked this tooltip and find that limitation to be a bit of a concern for my future needs. I suggest that a trigger event be added such as on "creation" to fire up the tooltips upon page load. I will definitely still use it in other projects that do not require that option.
If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;
If your question is related to the Javascript Tooltip, click:
Ask new question: Javascript TooltipOtherwise navigate to one of the following forum categories, and post your question there.
##