need some help with javascript.

I was using this java script to have tool tips in my web app. However I’m now having troubles getting it to work.

In my app properties there is a HTMLHeader property that points to this script.

The author wants me to download the script locally, but I’m not sure I know were to put it locally.

I found it here:
ProtoTip (Requires Prototype)
Download (You should purchase licence)

This is the code the author suggest to use.
I put in the HTMLHeader property of my web app.



I made the paths absolute to where I downloaded the java script and css.
This is how the author recommends calling the javascript:

new Tip(element, 'content', { title: 'This tooltip has a title', style: 'protoblue', stem: 'topLeft', hook: { tip: 'topLeft', mouse: true }, offset: { x: 14, y: 14 } });

And this is the code i use to invoke the javascript when the mouse enters the object.

Sub MouseEnter() if TheEventLink.Visible then ExecuteJavaScript("new Tip('"+_ me.ControlID +_ "', '" + GetContentString.forHTML + "', {"+_ "title: '" + GetTitleString.forHTML + "',"+_ "style: 'protoblue',"+_ "stem: 'topLeft',"+_ "hook: { tip: 'topLeft', mouse: true },"+_ "offset: { x: 14, y: 14 }"+_ "});") end if End Sub

When I run I get this error message:

Could not execute returned javascript: Xojo.controls.FWTFtipX is undefined
Source: var langdir = document.getElementsByTagName('body')[0]; if(langdir) { langdir.removeAttribute('dir'); }
var langdir = document.getElementsByTagName('body')[0]; if(langdir) { langdir.setAttribute('lang','en'); }

document.getElementById('FWTFtipX').style.overflow = 'hidden';
document.getElementById('FWTFtipX').style.overflow = 'hidden';

document.getElementById('Epj6Jyym').style.overflow = 'hidden';
document.getElementById('Epj6Jyym').style.overflow = 'hidden';

over and over and over...

I put a test project:
test project
That shows the issue. In this example the error message I get is:

[quote]Could not execute returned javascript: Tip is not defined
Source: new Tip(‘Q05NPIjn’, ‘Speaker: No Speaker set
Duration: 60 Minutes

No Description’, {title: ‘12:00 : No Topic set’,style: ‘protoblue’,stem: ‘topLeft’,hook: { tip: ‘topLeft’, mouse: true },offset: { x: 14, y: 14 }});[/quote]

You will have to download prototip from the link provided in the previous post.
I don’t think the author would object if you downloaded without purchasing a license. (For the purpose of debugging.)

bump… Does anyone know why this simple program isn’t working?

I struggled with this also. It seems to need to point to web site or a file with a website. Here’s mine for testing purposes on my MBP:

That looks a lot like the error that happens when code is trying to manipulate a control before it has arrived in the browser