Triggering fb from a Photoshop "Slice"

Page: 1

Author Post
Member
Registered: Dec 2015
Posts: 8
Photoshop has a "slice" tool that makes it possible to set a hyperlink into an image. I"m trying to trigger fb from within that tool.
As part of the process, photoshop creates html code that is essentially a virtual image, or that has a series of calls to images, that looks like this:

<html>
<head>
<title>ExampleFile</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (ExampleFile.png) -->
<table id="Table_01" width="1296" height="4777" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
<img src="images/ExampleFileInset_01.gif" width="1296" height="2022" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="images/ExampleFileInset_02.gif" width="801" height="2755" alt=""></td>
<td>
<a href="http://filename.com" target="_self">
<img src="images/ExampleFile_03.png" width="284" height="76" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/ExampleFileInset_04.gif" width="211" height="2755" alt=""></td>
</tr>
<tr>
<td>
<img src="images/ExampleFileInset_05.gif" width="284" height="2679" alt=""></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>


In turn, I am embedding that in another page, which has floatbox working for all other applications, with a line of code like this:

<object data="images/Interactive/ExampleFile/ExampleFileInset.html" width="1334" height="4884"> <embed src="images/Interactive/ExampleFile/ExampleFileInset.html" width="1334" height="4884"> </embed> Error: Embedded data could not be displayed. </object>


But while the generated code does embed properly (kind of like an Iframe), I can't get floatbox to trigger. I recognize that the floatbox language is missing from the examples I've supplied. Basically, I'd copied and pasted the code from a working page, with floatbox functioning properly there. But I can't get it to work.
Any suggestions appreciated.
Administrator
Registered: Aug 2008
Posts: 3382
Not sure what it is you are wanting to show in a floatbox but if it is the object: The way to show an element that resides on the main page is to give that element an id and reference that id as the floatbox source. So, for example, if we gave your object an id of "myObject", we could start it from a link like <a class="floatbox" href="#myObject">...</a> or from an API call like start( '#myObject' );.
Member
Registered: Dec 2015
Posts: 8
I wish I could post a screen capture of the stage in making a slice where a person puts in the URL, because this would be easier to explain that way.
I'm not, as far as I understand what you're saying, trying to load an object. I'm trying to display other web pages.
In making a photoshop slice, there's a dialogue box that includes blanks both for URL and for Target. A person fills out this form before the html is generated. I've tried pasting in floatbox code that has worked fine for conventional html, and it hasn't worked.
So, for example, say I wanted to load the floatbox forum from one of these slices. Ordinarily, I'd put in the code that says <a href="website address", then all the specifications, etc, and it would work. But with these slices, it just freezes.
Administrator
Registered: Aug 2008
Posts: 3382
After our conversations outside of the forum, I have come to think that what you are seeking is not so much the Floatbox markup needed to light up your links, but rather how to manipulate or configure Photoshop to generate that markup. I can't help with that. That would be a question for a Photoshop support channel.

It seems you want to make the links that Photoshop generates in its slice html to activate the href target in a floatbox. This is pretty easy to do without manipulating Photoshop's markup just by placing the 'slice' html inside a div that has the "floatbox" class on it. Any links inside that div will inherit that "floatbox" class for the purpose of activating those links for floatbox display. You can also put data-fb-options on that div and have those inherited too.

But - and this is important - you need to update Floatbox to the latest-greatest version. That's a pretty ancient version you've got on your site, and I don't think that one does class inheritance from a containing div.

Page: 1