Images and Javascript

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Images and Javascript

Post 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?
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Images and Javascript

Post 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.
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Re: Images and Javascript

Post 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.
Attachments
balloon.zip
(62.83 KiB) Downloaded 176 times
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Images and Javascript

Post 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.
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Re: Images and Javascript

Post by rmullis »

Yeah, I tried it that way first, but still no images were pulled in.
rmullis
Experienced User
Posts: 100
Joined: Tue Feb 21, 2012 1:24 pm
First Name: Robert
Last Name: Mullis
Company Name: WRC
State / Province: Georgia
Country: United States
Contact:

Re: Images and Javascript

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests