Page 1 of 1

Images and Javascript

Posted: Fri Jun 01, 2012 1:32 pm
by rmullis
I have created a custom javascript. In the script, I use several images (png files). I have placed the images in folder profoundui/userdata/custom/images. The script executes perfectly, except it will not pickup the images to display. I have tried using path profoundui/userdata/custom/images, as well as the full folder path (www/profoundui/htdocs/profoundui/userdata/custom/images), in my script. Neither has worked. I made sure to restart the PROFOUNDUI HTTP instance each time I changed the path name in my script to make sure that wasn't the problem.

What would be the correct path name to use?

Re: Images and Javascript

Posted: Fri Jun 01, 2012 2:18 pm
by David
The correct path to use would be:

/profoundui/userdata/custom/images/yourfile.png

The /www/profoundui/htdocs directory is the HTTP server's root directory and is never referenced in a file path. Paths are just given assuming this directory is the root, as above.

It's never necessary to restart the HTTP server, unless you are applying a change in the HTTP server configuration file. Also, the product installer will end/restart it during an install/update. Other than that, no reason to ever do it.

Re: Images and Javascript

Posted: Fri Jun 01, 2012 3:27 pm
by rmullis
That is what I thought.

I am trying to create a custom balloon tooltip. I have found a javascript and image files for it on the interwebs. I placed everything in the appropriate folders in profoundui/userdata/custom, folder js for scripts and images folder for the subfolders for the two types of .png files. So far I can get it to work, except the images won't display and the text in the tooltip won't wordwrap.

I am an old green-screen programmer and just getting into this javascript stuff. If you have time, would you look at my javascripts and see what I am missing?

This is my script on the onmouseover event:

Code: Select all

var balloon = new Balloon;
BalloonConfig(balloon,'GBubble');
var id = this.id;row = id.split(".")[1];
var notesrqsd = get("RQSDNOTES." + row);
balloon.showTooltip(event,notesrqsd,1);
The balloon tooltip javascripts are attached in a zip file.

Re: Images and Javascript

Posted: Tue Jun 05, 2012 11:07 am
by David
There may be other problems, but I see one probem right away.

The path to the image directories are not given properly in "balloon.config.js". You are missing the leading slash -- specify as shown in my post above.

Re: Images and Javascript

Posted: Tue Jun 05, 2012 2:17 pm
by rmullis
Yeah, I tried it that way first, but still no images were pulled in.

Re: Images and Javascript

Posted: Wed Jun 06, 2012 9:36 am
by rmullis
I just removed this balloon tooltip and when back to the default tooltip. I was trying to get a tooltip that I had control over (setting fonts, size, etc.), but I couldn't get this to completely work.