Solved

Call Slimbox through URL

Posted on 2009-04-02
8
340 Views
Last Modified: 2013-11-11
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
Comment
Question by:M256
  • 5
  • 3
8 Comments
 
LVL 10

Expert Comment

by:MaxOvrdrv2
ID: 24065741
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
 
LVL 5

Author Comment

by:M256
ID: 24066600
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
 
LVL 10

Expert Comment

by:MaxOvrdrv2
ID: 24067823
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 5

Author Comment

by:M256
ID: 24067858
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
 
LVL 10

Expert Comment

by:MaxOvrdrv2
ID: 24067881
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
 
LVL 5

Author Comment

by:M256
ID: 24082548
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
 
LVL 10

Accepted Solution

by:
MaxOvrdrv2 earned 300 total points
ID: 24083043
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
 
LVL 10

Expert Comment

by:MaxOvrdrv2
ID: 24083045
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Decoding Special HTML Characters using Javascript? 2 29
Google Maps API and PHP 25 34
showing loader for php/mysql/ajax live search 13 26
replace link with jQuery 4 15
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question