The following also appears in the original thread but I thought that it would also be a good idea to make it a separate post thus allowing other users to easier find the solution.
Get two images to pop up when I click on an image, This involves a two different components
Component 1
You will need a static page that will display the results. Following is a sample page “display-multi-image.html” that is invoked by the second component. FYI this is the actual page I used in my solution and I placed it at the root level of my site, if you place it elsewhere then you will have to make the necessary change in component 2.
<html>
<head>
<title>
Precision Marble: Display Pics
</title>
<script language="JavaScript">
var idx = document.URL.indexOf('?'); /*parameters on this URL? */
var new_image = document.URL.substring(idx+1,document.URL.length);
var new_image_Zoom = new_image + " Zoom.jpg";;
var new_image_Medium = new_image + " Medium.jpg";;
</script>
</head>
<body >
<div align="center">
<script language="JavaScript" type="text/javascript">
document.write('<B>Disclaimer:</B> TruStone is produced through the Photofuzion process and the results will vary, furthermore, computer monitors will display color differently. As such, images on our website should not be used for color matching or selection. Rather, we recommend you view physical samples of colors at our showroom.<br /> <br /> ');
document.write('<h1>10" Detail View</H1> <br /> <br />');
document.write('<img src=' +'"' +new_image_Zoom+ '"'+'>');
document.write('<br /> <br /><h1>63" x 124" View</h1><br /> <br />');
document.write('<img src=' +'"' +new_image_Medium+ '"'+'>');
</script>
</div>
</body>
</html>
Component 2
- Insert you image on the XWD page in the desired location.
- Size the image to the desired size (the actual image will be placed on the webpage by the code below but to ensure proper placement of everything it should be the same size as the final image).
- Select the image and click on the “Link Properties” icon in the toolbar (it looks like a chain link)
- Click on the Placeholder tab
- In the “Replace with HTML code” past the following>
<a href="#" onClick="window.open
('display-multi-image.html? <a href="#" onClick="window.open
('display-multi-image.html?images/StoneImage/Granite/Amber Fantasy','display_2','resizable,scrollbars,width=8 00,height=670').focus();return false;"><img src="images/StoneImage/Granite/Amber Fantasy Small.jpg" alt="Amber Fantasy" height="99" width="99" /></a>- In the above pasted code
- 'display_2','resizable,scrollbars,width=800,height =670' defines the pop-up window
- images/StoneImage/Granite is the path to my image
- Amber Fantasy Small.jpg is the name of my image, actually I have three images in the folder that I will be using.
- Amber Fantasy Medium.jpg
- Amber Fantasy Small.jpg
- Amber Fantasy Zoom.jpg
- height="99" width="99" is the size of the image on the live webpage. Remember above I mentioned to size the image in XWD the same as the image on the webpage. For me this is the size I needed.
- Click on the Apply button
- Click on the OK button
- Click on the Save icon in the toolbar
- Publish to your website and test.
I'm sure there are other methods but this worked for me. If somebody has a better suggestion, I'm all for it.
Again thanks to all that helped with the solution.
Bookmarks