Photo Gallery (web component) FP2003

  • Thread starter Thread starter Jerome Ranch
  • Start date Start date
J

Jerome Ranch

Got the Photo Gallery to work fine..
Is there a way to configure it such that the images open when clicked
in a new window?
Thanks
Jerry
 
Right click the page in design view.
Select Page properties.
Click the little pencil looking button to the right of Default Target Frame.
Select New window.
Click OK.
Save.
Publish.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
Bet I did know it's not a page. ;-)

They could also use the free Spawn from Jimco Software,
www.jimcosoftware.com

Here's a sample that opens the correct size window "on the fly" by reading
the image dimensions from the file on the server before it opens the window:
http://www.95isalive.com/test/
Works in IE and FF, don't know about the rest.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
Steve said:
Here's a sample that opens the correct size window "on the fly" by
reading the image dimensions from the file on the server before it
opens the window: http://www.95isalive.com/test/
Works in IE and FF, don't know about the rest.

Steve,
I tried your function when you posted it before.

But I found it sometimes didn't want to wait while the dimensions were
found - it would just did nothing.

So, instead of a setTimeout, I added an alert and I found that by the time
the alert was displayed and I tried again, then there wasn't a problem - it
loaded immediately.

This is my replacement function
// =============================
function newWindow(img,caption)
{
var imageToLoad = new Image()
imageToLoad.src = img
var h = imageToLoad.height
var w = imageToLoad.width
var windh = h + 50

// check to see if we have the dimensions and if not, display alert and
return
if (h*w == 0)
{
alert('"' + caption + '" did not load.\nPlease try again')
return }
else
spawnJimcoPopup
('picture.html?picture=' + img + '&caption=' + caption
+ '&height=' + h + '&width=' + w
, '_blank'
,
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'
, windh,w,'center','0','pixel')
}
// =============================

I will experiment some more with your original function to see why it
sometimes doesn't work.

I wonder whether it would still work if {alert ........ return}
were replaced by setTimeout(newWindow(img,caption),1000)
i.e. by calling itself again
 
Eleanor
I think for now, since these are all the photos for that year I'll be
posting, I'm fine. If it breaks, I'll look for an alternative. I
have too many more important things to do with the site (related to
event planning and communication)
But I have some personal others uses for displaying web photos. I
will evaluate the other album makers.
I've used the Jasc (corel) product, but it has little flexibility
http://www.jerrysbigworld.com/Ripley_litter_2005/

Wht I'd like to do is open a new window with a "Theme" that matches
the theme of the pages. Any way to do that?




BTW I enjoyed your Zion and Bryce photos. After all my many years of
backpacking, I finally made it to the 4 corners area 4 years ago..I've
been back 5 times since. This summer I visted Bryce, Zion, and the
North Rim (all for the first time). Got several altutuide sick at
Bryce and the North Rim. Went down to Sedona again to reward myself.

Jerry
 
Jerome said:
Wht I'd like to do is open a new window with a "Theme" that matches
the theme of the pages. Any way to do that?

Jerry,
Eleanor always give good advice, especially related to galleries.

But to comment on your last question,
It is easy to use a background image on a new page where your images are.

To see what I mean, go to Picture Album on my site and click on Personal
Photo Gallery.
You will see that the background is exactly the same.

I have no doubt that this can be done with JAlbum or other gallery software.
It is only a CSS background image, after all.

However, the way the heading and left sidebar remain the same is done by
using frames, which is a whole new story.
(It can also be done with includes)

Since I don't use themes I don't know whether this is the same. I assume
themes are probably based on CSS styles.

Possibly all you have to do for each image is replace tags such as
<a href="dsc_1819.jpg">
with
<a href="dsc_1819.html">

In dsc_1819.html, set up a theme with this tag in the <head>:
<link rel="stylesheet" type="text/css" href="_themes/jbf2/jbf21011.css">
In the body, add an image tag:
<img border="0" src="dsc_1819.jpg"title="" />

You wouldn't have to do much else (except to reference the styles in the
theme)
 
Yep
In an older version of FF it needed an alert box.
The latest one I installed doesn't need it. ( or doesn't seem to need it )

Appreciate the feedback though.
It's just something I've been tinkering with.

;-)

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
Steve said:
Yep
In an older version of FF it needed an alert box.
The latest one I installed doesn't need it. ( or doesn't seem to
need it )
Appreciate the feedback though.
It's just something I've been tinkering with.

Steve,
I like to explore what's possible, also - called tinkering, I guess :-))
So I tried the code below, which also *seems* to work.

I have a couple of questions
1. Why is testit() defned as
new function testit() ?
Does this give the same result as replacing this line by:
testit()
function testit() ?

2. The var ImageToLoad is defined outside testit() as a local, as I
understand it (local because the prefix var is used).
Is it still known inside testit() or does the declaration there create a new
global variable (global because the prefix var is not used)?
(I note that your code declares it as global, i.e. outside all functions.)

3. How does loadit() know the variables imageToLoad, img and caption ?
Do all internal functions inherit variables from their parent function ?

//========= My function ================
function newWindow(img,caption)
{
var imageToLoad = new Image()
new function testit()
{
imageToLoad.src = img
// we need a little pause while the script gets the image since the
image is on the server,
// or the browser will open the window and write the script before the
image is cached,
// which causes the script to write zeros for the resizeto dimensions.
setTimeout(loadit,1000)

//--- Internal function ---
function loadit()
{
//check to see if we have the dimensions and if not, go back and wait
another 1 second
var w = imageToLoad.width
if (w == 0 )
testit()
else
{
var h = imageToLoad.height
var windh = h + 50
spawnJimcoPopup
('picture.html?picture=' + img + '&amp;caption=' + caption
+ '&amp;height=' + h + '&amp;width=' + w
, '_blank'
,
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'
, windh,w,'center','0','pixel')
}
} //--- End loadit() ---
}//--- End testit() ---
}
 
Oops Steve
Yep the pics open up in a new window, but then so do all the links on
the page, including the links on the nav bar.
I didn't want that.
I only wanted the pics to open in a new window, and the nav bar links
to open in the current window
Any ideas for that?
Thanks
Jerry
 
Back
Top