Imagepage tokens and javascript

DC
Posted By
Dion_Campbell
Oct 7, 2003
Views
301
Replies
4
Status
Closed
Are you using javascript to do it? I’m trying to do the same thing but can’t find a solution, though I do know the problem. The script is:

onClick=" window.open(‘%imagepage%’,’newwindow’,’width=700,height=500, scrollbars=yes’) "

However, when you create the webgallery, the script generated is:

onClick="window.open(‘"thumbnailpage1.htm"’,’newwindow’,’width=700,height=500,scrollbars=yes’) "

In other words, %imagepage% becomes "thumbnailpage1.htm". And it is the inclusion of the "" which is causing the javascript problems.

Does anybody know how to remove the ""? Or maybe an alternative script? My email is

Thanks

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

DM
Don_McCahill
Oct 7, 2003
Why worry about removing the " from the variable? You could remove the single quotes from around it in the onClick call. Either single or double quotes work equally as well in Javascript.
SS
sepp_Spenlinhauer
Jan 14, 2004
I don’t know what your talking about DON, But I can’t get the onClick event to work with " (double quotes) in place of single.
I have tried several permutations of the script.

What I can Dion, is that if you are using an HTML editor that has a find and replace function, you could have Photoshop build the file with the incorrect syntax, and then just do a find on the bad bits and replace them.
I am using Go Live and it will do a replace all on a text string. The hard part was figuring out how to make the search string unique enough – which I figured out reading your post and felt kind of dumb,
just put the %xxxx% token in between the (‘ ‘) of the javascript call and then do a search for (‘" and replace with (‘
you’ll have to do it for both sides of the file name seperetly.

But it works like a charm!

(of course I’d love to have at the source code of the script that BUILDS the web gallery in the first place, but so be it.

SEPP!
SB
steven_berkowitz
Jan 19, 2004
You seem to know how to get into the script code. Can you tell me the best way to do this (best app for Mac), and where the script files actually are hidden? I just want to stop the Web Photo Gallery from trying to open the resulting files in inDesign, or stop opening them at all. PS7 opened pages in IE (even when my default browser is Safari), but not PS8.

pre-thanks for any assistance – – –
SB
steven_berkowitz
Mar 1, 2004
You could use the target=blank attribute of the tag, but I suppose you want exactly a certain size.

Here is how I do it, but I do not have the time to test it on your situation.

function openWindow() {
higher = screen.availHeight;
wider = screen.availWidth;
bigWindow=window.open(‘product/indexMaster.html’,’mainPage’, ‘height=’ + higher + ‘, width=’ + wider + ‘,scrollbars=yes, status=yes,top=0,left=0’);
}

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections