• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 347
  • Last Modified:

Call Slimbox through URL

Go this URL and click an image:
http://c.osbornewood.com/cadcd/all__34-and-one-half-inches.cfm

It pulls up an image using Slimbox.

I would like to set it up so I can link to the page Slimbox will pull up a particular image when it loads.

The url would take this form:

http://c.osbornewood.com/cadcd/all__34-and-one-half-inches.cfm#part_1456
http://c.osbornewood.com/cadcd/all__34-and-one-half-inches.cfm?part=1456#part_1456

FYI, this will go on a DVD.  I can change the output as much as I like, but the final version has to be static.  JavaScript needs to do the heavy work here.
0
M256
Asked:
M256
  • 5
  • 3
1 Solution
 
MaxOvrdrv2Commented:
you mean you want to link from YOUR page to THIS page and just have Slimbox load with the image within YOUR page? i'm not sure what you're trying to accomplish.
0
 
M256Author Commented:
Sorry.

[Index] page with a list of links.

[Image] page, with slimbox and tons if images.

Each link from [index] page will open the [image] page to #part_XXXX and in that same action on the [image] page will also open the appropriate image in slimbox.
0
 
MaxOvrdrv2Commented:
I still don't understand... Seems to me like you just want to create all the links yourself. What do you need javascript for?

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
M256Author Commented:
The links pull up the page, and move it to the correct line.  The JavaScript is to activate Slimbox, opening the correct image while darkening the rest of the page.
0
 
MaxOvrdrv2Commented:
Easy,

Put a query string in the link, then on the page itself, put a javascript function that checks the querystrin, and if present, duplicates the javascript contained in the link on the page.
0
 
M256Author Commented:
Sounds good in theory :)

I looked at the code and while I know a little JavaScript I couldn't see how to do it right away.

Can you check it out?  I've raised the points on the question...
0
 
MaxOvrdrv2Commented:
links on your first page have the following:

imagespage.cfm?id=1496_2d

imagespage has the following, at the very end (note that this will not work unless you have the slimbox code working on your own server, if you're trying to rip-off someone else's functionality that they probably paid for, i can't help you). The code below actually brings you to the .dxf file instead of the slimbox, but you can use this and put in the right code to call in slimbox since this is your product, right?! this is just to give you the idea on how to do it yourself :
<script type="text/javascript">
//here we get the query strings passed to the url, you can add more and split them (&) for other uses
var urlid= window.location.search.substring(1).replace("id=","");
//here we check if a querystring is present, if so
if(urlid!="")
{
   //open a new window with the .dxf file that corresponds to the query string.
   window.open("../../files/2dDXF/" + urlid + ".dxf";
}
</script>

Open in new window

0
 
MaxOvrdrv2Commented:
sorry... made a mistake, forgot to close the paretheses on the window.open:
window.open("../../files/2dDXF/" + urlid + ".dxf");

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now