Use of Highslide without changing <a> tag contents

Technical support, bug reports, feature requests and more.

Use of Highslide without changing <a> tag contents

Postby pipeline on Sat Dec 23, 2006 8:13 am

Hello-

highSlide is amazing and beautiful, I really hope to be able to get it to work with my system.

I am using a package which generates links and HTML from scientific data and images in an automated fashion, which presents two problems:

1) I cannot simply add the empty div (<div id="highslide-container"></div> ) to the first line of the <body> in my HTML. Is there a simple way to make the window.onload add this tag to the appropriate place?

2) I can not control what goes in the <a> tag. I can control what goes in the onclick. Is it possible to store the path to the full-sized image somewhere other than in the <a> tag (e.g. as a standalone href tag), or pass it in the onclick?

Thank you,
Leo
pipeline
 
Posts: 2
Joined: Sat Dec 23, 2006 7:39 am

Postby admin on Sat Dec 23, 2006 11:45 am

1) Actually I am in the process of disposing of the highslide-container, and generate it dynamically. I just haven't completely tested it yet, but I am quite sure it will work properly. Here is what you do: a) identify this line in highslide.js: hs.container = hs.$('highslide-container'); b) comment out this line, and exchange it with this code :
Code: Select all
if (!hs.container) {
   hs.container = hs.createElement('div',
   null,
   { position: 'absolute', left: 0, top: 0, width: '100%', zIndex: hs.zIndexCounter },
   document.body
   );
}

Note that this is not exactly the same code as you see commented out in your version 2.2.7 file.

2) If you can control what goes in the rel tag, you can put the full-sized image path there. If not, you have to do some edits in the highslide.js file again.
User avatar
admin
Site Admin
 
Posts: 7818
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

no <a> tag control

Postby pipeline on Sun Dec 24, 2006 2:08 am

Hey thanks for the quick reply. It works perfectly with those changes.

Now I just need to figure out how to apply the styles.

Thanks again,
Leo
pipeline
 
Posts: 2
Joined: Sat Dec 23, 2006 7:39 am

Postby JesseHeap on Wed Jan 17, 2007 10:01 pm

admin wrote:1) Actually I am in the process of disposing of the highslide-container, and generate it dynamically. I just haven't completely tested it yet, but I am quite sure it will work properly.


I tested this change in my wordpress installation for IE 7 and FF 2.0 and it worked perfectly. Look forward seeing this released.
JesseHeap
 
Posts: 9
Joined: Wed Jan 10, 2007 12:29 am


Return to Highslide JS Usage

Who is online

Users browsing this forum: Google [Bot] and 1 guest