PDA

View Full Version : balloon tip triggered by form text field



thomasbill
06-23-2009, 08:31 AM
I am using the Rich HTML Tooltip Script

URL: http://www.dynamicdrive.com/dynamicindex5/balloontooltip.htm

The script is great, but right now using the rel tag e.g: rel="balloon1" means that I can only apply this tooltip to a hyperlink, right?

1) is there anyway I can apply the tooltip to a different element. For example if the user was to click inside of a text field (search box) I would like this to trigger a tooltip appearing from the submit button, which is actually a regular text link, not a form button.

So basically i want the search field to trigger a tooltip from a link else where on a page

2) The tooltip only appears once per session.

I am already using a slightly modified version of this script, one of the tooltips on the page displays on onload, once per session. (see here: http://www.dynamicdrive.com/forums/showthread.php?t=46131 )

On the same page I would like this to work too...

any ideas? I am not really very advanced with scripting so if you can help, make it clear...

THANKS IN ADVANCE

thomasbill
06-24-2009, 08:10 AM
any ideas?

jscheuer1
06-25-2009, 04:38 AM
This is a little confusing. Not so much because you haven't explained your requirements, as that they don't seem to make a lot of sense to me at the moment.


1) is there anyway I can apply the tooltip to a different element. For example if the user was to click inside of a text field (search box) I would like this to trigger a tooltip appearing from the submit button, which is actually a regular text link, not a form button.

Yes something like that can be done. However, it would be much easier to work out if I had an example of the HTML code you want to apply this to. So either:

Please post a link to the page on your site that contains the code so we can check it out.

or provide example code of a "submit button, which is actually a regular text link, not a form button"

That said, clicking inside a text field would activate its onfocus event. I could use that to trigger a chain of code that could achieve the desired results under the stated conditions, if I had a better idea of the actual elements involved and how they actually relate to each other within the page.

thomasbill
06-25-2009, 05:31 AM
Code below is for the search box (when a user clicks within it i wish it to trigger a tooltip from the search button:

<input autocomplete="off" name="q_display" maxlength="200" size="36" class="textbox" style="width: 260px;" id="search_field" type="text">

For the search button the code is:

<a href="#" onclick="document['searchfront'].submit(); return false" class="submitlink" id="front_search_submit">Start Search</a>

If possible once per session only.

thomasbill
07-03-2009, 07:46 AM
So, no ideas on this one?