Controlling browser window size

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a thumbnail that opens a smallish picture in a new browser window.
I'd like to control the size of the new window so its about the same size as
the picture. Now it opens up a fullscreen window which dwarfs the picture.
I've seen other sites that do that but I can't figure out how to do it in FP.
Can someone help please?

Thanks,
Marc
 
MarcParnes said:
Hi,
I have a thumbnail that opens a smallish picture in a new browser
window. I'd like to control the size of the new window so its about
the same size as the picture. Now it opens up a fullscreen window
which dwarfs the picture. I've seen other sites that do that but I
can't figure out how to do it in FP. Can someone help please?

Thanks,
Marc

Marc,
FP won't do it by itself, but Steve Easton (MVP) and I have been having a
discussion over many threads about a script that will do it.

Steve's script is below, with one small change (only he will know what it
is).
Go to Code or HTML view and paste it between <head> and </head>:
// =============== Script to paste ================
<script type="text/javascript">
var img , imageToLoad , sVarA , sVarRS
var newwindow , newdocument , sToPass
function newWindow(img)
{
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()
{
sVarA = ("left=20px" + ",top=20px" + ",width=" + imageToLoad.width +
",height=" + imageToLoad.height)
sVarRS = 'onload="resizeTo(' + imageToLoad.width + ',' +
imageToLoad.height + ')"'

sToPass='<html><head>\n'
+ '<style type="text/css"> body{ background-repeat:
no-repeat; }</style>\n'
+ '<title>' + img + '</title>\n'
+ '</head>\n'
+ '<body ' + sVarRS + ' background=' + img + '>\n'
+ '</body></html>'
//check to see if we have the dimensions and if not, go back and wait
another 1 second
if ( imageToLoad.width == 0 ){ testit() }
else
newwindow = window.open('','',sVarA)
newdocument = newwindow.document
newdocument.write(sToPass)
newdocument.close()
}
//--- End loadit() ---
}
//--- End testit() ---
}
</script>
// =============== End of Script ================

Call it from HTML by
<a href="#" onclick="newWindow('mypicture.jpg')">
<img src="mypicture_t.jpg" alt=" ">My picture</a>
Change:
'mypicture.jpg' to the name of your image
"mypicture_t.jpg" to the name of your thumbnail image
'My picture' to your caption

You can change the position of the page by left and top in this line
sVarA = ("left=20px" + ",top=20px" + ",width=" + imageToLoad.width +
",height=" + imageToLoad.height)

I found it works quite nicely.

Steve, hope you don't mind. I think the script is great.
I have modified it myself (see my website) to place the background image in
a grey box, centered horizontally, with grey rounded corners, but that's
just an added bell (or is a whistle?) Marc, I can send details of how to do
this, but the rounded corners are a bit tricky.
 
Murray said:
Trevor - have you or Steve tried this on Macs?

Don't know about Steve.
He says it is still in development. He calls it tinkering.

I am at a similar stage. I feel that sometimes it doesn't work.

I did notice that Firefox had a message in the Javascript Console:
"Too many recursions" which may be realated

When it doesn't work, I replace
if ( imageToLoad.width == 0 ){ testit() }
by
if ( imageToLoad.width == 0 )
alert('Image did not load. Please try again')
This does not seem to fail. When I do try again, the image loads fine.

I am thinking a better option may be
if ( imageToLoad.width == 0 )
{
alert('Image did not load. Press enter to try again')
testit()
}

To answer the specific question:
No. I do not have access to a Mac
 
Hi Murray,
As Trevor mentioned this is just something I've been playing with because I
think it's possible to point a script at a folder full of images and create
the links "on the fly."

That said. I've not tried it on a Mac. But, if a Mac supports JavaScript
that's been around since the days of Mosaic, it "should work."


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
Steve said:
Hi Murray,
As Trevor mentioned this is just something I've been playing with
because I think it's possible to point a script at a folder full of
images and create the links "on the fly."

Steve,
As you know I have been playing with this as well.

Below is my latest version.

OK, so I call spawnJimco Popup to open the window instead of the basic
window open calls. But this is to give me some extra stuff - a centred
window with a Print button, a "Click to close" option, and a grey background
with rounded corners. However, the principle is the same.

This seems to work every time in IE6 and FF1.5 on my local web. I do not
even get the confirm box coming up. I will put it on my website and test it
here.

I will keep an eye out in the NG to see if you find any other problems with
it in your testing.

// ========= Latest Version==============
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
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 )
{
if (confirm('Image did not load.\nPress OK to try again\nPress
Cancel to exit')==true)
testit()
else
return
}
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() ---
}
// ========= End Latest Version==============
 
It does - what I'm more concerned about is having the Mac dynamically resize
the page based on the image's size. That has been problematic in the past -
something about how the Mac manages images or something....
 
And, for what it's worth, js support didn't become standard until well after
Mosaic. NN3, I believe, was the first of the big ones to add it.
 
I have a similar question. I wish toopen my web site in a maximized state
from the start. Can you help please.
 
IMHO
Unless you are running a PC based Kiosk
Design your web to adjust to the Users settings
- don't force a users browser to change size to suit your design
(it is their choice what browser size they want)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have a similar question. I wish toopen my web site in a maximized state
| from the start. Can you help please.
|
|
| "Murray" wrote:
|
| > It does - what I'm more concerned about is having the Mac dynamically resize
| > the page based on the image's size. That has been problematic in the past -
| > something about how the Mac manages images or something....
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Hi Murray,
| > > As Trevor mentioned this is just something I've been playing with because
| > > I think it's possible to point a script at a folder full of images and
| > > create the links "on the fly."
| > >
| > > That said. I've not tried it on a Mac. But, if a Mac supports JavaScript
| > > that's been around since the days of Mosaic, it "should work."
| > >
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > >
| > >
| > > | > >> Trevor - have you or Steve tried this on Macs?
| > >>
| > >> --
| > >> Murray
| > >> --------------
| > >> MVP FrontPage
| > >>
| > >>
| > >> | > >>> MarcParnes wrote:
| > >>>> Hi,
| > >>>> I have a thumbnail that opens a smallish picture in a new browser
| > >>>> window. I'd like to control the size of the new window so its about
| > >>>> the same size as the picture. Now it opens up a fullscreen window
| > >>>> which dwarfs the picture. I've seen other sites that do that but I
| > >>>> can't figure out how to do it in FP. Can someone help please?
| > >>>>
| > >>>> Thanks,
| > >>>> Marc
| > >>>
| > >>> Marc,
| > >>> FP won't do it by itself, but Steve Easton (MVP) and I have been having
| > >>> a discussion over many threads about a script that will do it.
| > >>>
| > >>> Steve's script is below, with one small change (only he will know what
| > >>> it is).
| > >>> Go to Code or HTML view and paste it between <head> and </head>:
| > >>> // =============== Script to paste ================
| > >>> <script type="text/javascript">
| > >>> var img , imageToLoad , sVarA , sVarRS
| > >>> var newwindow , newdocument , sToPass
| > >>> function newWindow(img)
| > >>> {
| > >>> 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()
| > >>> {
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" + imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>> sVarRS = 'onload="resizeTo(' + imageToLoad.width + ',' +
| > >>> imageToLoad.height + ')"'
| > >>>
| > >>> sToPass='<html><head>\n'
| > >>> + '<style type="text/css"> body{ background-repeat:
| > >>> no-repeat; }</style>\n'
| > >>> + '<title>' + img + '</title>\n'
| > >>> + '</head>\n'
| > >>> + '<body ' + sVarRS + ' background=' + img + '>\n'
| > >>> + '</body></html>'
| > >>> //check to see if we have the dimensions and if not, go back and
| > >>> wait another 1 second
| > >>> if ( imageToLoad.width == 0 ){ testit() }
| > >>> else
| > >>> newwindow = window.open('','',sVarA)
| > >>> newdocument = newwindow.document
| > >>> newdocument.write(sToPass)
| > >>> newdocument.close()
| > >>> }
| > >>> //--- End loadit() ---
| > >>> }
| > >>> //--- End testit() ---
| > >>> }
| > >>> </script>
| > >>> // =============== End of Script ================
| > >>>
| > >>> Call it from HTML by
| > >>> <a href="#" onclick="newWindow('mypicture.jpg')">
| > >>> <img src="mypicture_t.jpg" alt=" ">My picture</a>
| > >>> Change:
| > >>> 'mypicture.jpg' to the name of your image
| > >>> "mypicture_t.jpg" to the name of your thumbnail image
| > >>> 'My picture' to your caption
| > >>>
| > >>> You can change the position of the page by left and top in this line
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" + imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>>
| > >>> I found it works quite nicely.
| > >>>
| > >>> Steve, hope you don't mind. I think the script is great.
| > >>> I have modified it myself (see my website) to place the background
| > >>> image in a grey box, centered horizontally, with grey rounded corners,
| > >>> but that's just an added bell (or is a whistle?) Marc, I can send
| > >>> details of how to do this, but the rounded corners are a bit tricky.
| > >>>
| > >>> --
| > >>> Cheers,
| > >>> Trevor L.
| > >>> Website: http://tandcl.homemail.com.au
| > >>>
| > >>
| > >>
| > >
| > >
| >
| >
| >
 
Understan perfectly. But I have a problem with a top frame menubar
disappearing. i tried to absolute position it, but it didn't work. Anyone
that can help? I will email the code and needed content if so requested.

Stefan B Rusynko said:
IMHO
Unless you are running a PC based Kiosk
Design your web to adjust to the Users settings
- don't force a users browser to change size to suit your design
(it is their choice what browser size they want)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have a similar question. I wish toopen my web site in a maximized state
| from the start. Can you help please.
|
|
| "Murray" wrote:
|
| > It does - what I'm more concerned about is having the Mac dynamically resize
| > the page based on the image's size. That has been problematic in the past -
| > something about how the Mac manages images or something....
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Hi Murray,
| > > As Trevor mentioned this is just something I've been playing with because
| > > I think it's possible to point a script at a folder full of images and
| > > create the links "on the fly."
| > >
| > > That said. I've not tried it on a Mac. But, if a Mac supports JavaScript
| > > that's been around since the days of Mosaic, it "should work."
| > >
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > >
| > >
| > > | > >> Trevor - have you or Steve tried this on Macs?
| > >>
| > >> --
| > >> Murray
| > >> --------------
| > >> MVP FrontPage
| > >>
| > >>
| > >> | > >>> MarcParnes wrote:
| > >>>> Hi,
| > >>>> I have a thumbnail that opens a smallish picture in a new browser
| > >>>> window. I'd like to control the size of the new window so its about
| > >>>> the same size as the picture. Now it opens up a fullscreen window
| > >>>> which dwarfs the picture. I've seen other sites that do that but I
| > >>>> can't figure out how to do it in FP. Can someone help please?
| > >>>>
| > >>>> Thanks,
| > >>>> Marc
| > >>>
| > >>> Marc,
| > >>> FP won't do it by itself, but Steve Easton (MVP) and I have been having
| > >>> a discussion over many threads about a script that will do it.
| > >>>
| > >>> Steve's script is below, with one small change (only he will know what
| > >>> it is).
| > >>> Go to Code or HTML view and paste it between <head> and </head>:
| > >>> // =============== Script to paste ================
| > >>> <script type="text/javascript">
| > >>> var img , imageToLoad , sVarA , sVarRS
| > >>> var newwindow , newdocument , sToPass
| > >>> function newWindow(img)
| > >>> {
| > >>> 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()
| > >>> {
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" + imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>> sVarRS = 'onload="resizeTo(' + imageToLoad.width + ',' +
| > >>> imageToLoad.height + ')"'
| > >>>
| > >>> sToPass='<html><head>\n'
| > >>> + '<style type="text/css"> body{ background-repeat:
| > >>> no-repeat; }</style>\n'
| > >>> + '<title>' + img + '</title>\n'
| > >>> + '</head>\n'
| > >>> + '<body ' + sVarRS + ' background=' + img + '>\n'
| > >>> + '</body></html>'
| > >>> //check to see if we have the dimensions and if not, go back and
| > >>> wait another 1 second
| > >>> if ( imageToLoad.width == 0 ){ testit() }
| > >>> else
| > >>> newwindow = window.open('','',sVarA)
| > >>> newdocument = newwindow.document
| > >>> newdocument.write(sToPass)
| > >>> newdocument.close()
| > >>> }
| > >>> //--- End loadit() ---
| > >>> }
| > >>> //--- End testit() ---
| > >>> }
| > >>> </script>
| > >>> // =============== End of Script ================
| > >>>
| > >>> Call it from HTML by
| > >>> <a href="#" onclick="newWindow('mypicture.jpg')">
| > >>> <img src="mypicture_t.jpg" alt=" ">My picture</a>
| > >>> Change:
| > >>> 'mypicture.jpg' to the name of your image
| > >>> "mypicture_t.jpg" to the name of your thumbnail image
| > >>> 'My picture' to your caption
| > >>>
| > >>> You can change the position of the page by left and top in this line
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" + imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>>
| > >>> I found it works quite nicely.
| > >>>
| > >>> Steve, hope you don't mind. I think the script is great.
| > >>> I have modified it myself (see my website) to place the background
| > >>> image in a grey box, centered horizontally, with grey rounded corners,
| > >>> but that's just an added bell (or is a whistle?) Marc, I can send
| > >>> details of how to do this, but the rounded corners are a bit tricky.
| > >>>
| > >>> --
| > >>> Cheers,
| > >>> Trevor L.
| > >>> Website: http://tandcl.homemail.com.au
| > >>>
| > >>
| > >>
| > >
| > >
| >
| >
| >
 
Post a link to the page after it's been uploaded somewhere.

Solving a problem like this by forcing the browser viewport to maximize is
like solving a headache with a 45 caliber bullet....

--
Murray
--------------
MVP FrontPage


KittyKat said:
Understan perfectly. But I have a problem with a top frame menubar
disappearing. i tried to absolute position it, but it didn't work. Anyone
that can help? I will email the code and needed content if so requested.

Stefan B Rusynko said:
IMHO
Unless you are running a PC based Kiosk
Design your web to adjust to the Users settings
- don't force a users browser to change size to suit your design
(it is their choice what browser size they want)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have a similar question. I wish toopen my web site in a maximized
state
| from the start. Can you help please.
|
|
| "Murray" wrote:
|
| > It does - what I'm more concerned about is having the Mac dynamically
resize
| > the page based on the image's size. That has been problematic in the
past -
| > something about how the Mac manages images or something....
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Hi Murray,
| > > As Trevor mentioned this is just something I've been playing with
because
| > > I think it's possible to point a script at a folder full of images
and
| > > create the links "on the fly."
| > >
| > > That said. I've not tried it on a Mac. But, if a Mac supports
JavaScript
| > > that's been around since the days of Mosaic, it "should work."
| > >
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > >
| > >
| > > | > >> Trevor - have you or Steve tried this on Macs?
| > >>
| > >> --
| > >> Murray
| > >> --------------
| > >> MVP FrontPage
| > >>
| > >>
| > >> | > >>> MarcParnes wrote:
| > >>>> Hi,
| > >>>> I have a thumbnail that opens a smallish picture in a new
browser
| > >>>> window. I'd like to control the size of the new window so its
about
| > >>>> the same size as the picture. Now it opens up a fullscreen
window
| > >>>> which dwarfs the picture. I've seen other sites that do that but
I
| > >>>> can't figure out how to do it in FP. Can someone help please?
| > >>>>
| > >>>> Thanks,
| > >>>> Marc
| > >>>
| > >>> Marc,
| > >>> FP won't do it by itself, but Steve Easton (MVP) and I have been
having
| > >>> a discussion over many threads about a script that will do it.
| > >>>
| > >>> Steve's script is below, with one small change (only he will know
what
| > >>> it is).
| > >>> Go to Code or HTML view and paste it between <head> and </head>:
| > >>> // =============== Script to paste ================
| > >>> <script type="text/javascript">
| > >>> var img , imageToLoad , sVarA , sVarRS
| > >>> var newwindow , newdocument , sToPass
| > >>> function newWindow(img)
| > >>> {
| > >>> 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()
| > >>> {
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>> sVarRS = 'onload="resizeTo(' + imageToLoad.width + ',' +
| > >>> imageToLoad.height + ')"'
| > >>>
| > >>> sToPass='<html><head>\n'
| > >>> + '<style type="text/css"> body{ background-repeat:
| > >>> no-repeat; }</style>\n'
| > >>> + '<title>' + img + '</title>\n'
| > >>> + '</head>\n'
| > >>> + '<body ' + sVarRS + ' background=' + img + '>\n'
| > >>> + '</body></html>'
| > >>> //check to see if we have the dimensions and if not, go back
and
| > >>> wait another 1 second
| > >>> if ( imageToLoad.width == 0 ){ testit() }
| > >>> else
| > >>> newwindow = window.open('','',sVarA)
| > >>> newdocument = newwindow.document
| > >>> newdocument.write(sToPass)
| > >>> newdocument.close()
| > >>> }
| > >>> //--- End loadit() ---
| > >>> }
| > >>> //--- End testit() ---
| > >>> }
| > >>> </script>
| > >>> // =============== End of Script ================
| > >>>
| > >>> Call it from HTML by
| > >>> <a href="#" onclick="newWindow('mypicture.jpg')">
| > >>> <img src="mypicture_t.jpg" alt=" ">My picture</a>
| > >>> Change:
| > >>> 'mypicture.jpg' to the name of your image
| > >>> "mypicture_t.jpg" to the name of your thumbnail image
| > >>> 'My picture' to your caption
| > >>>
| > >>> You can change the position of the page by left and top in this
line
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>>
| > >>> I found it works quite nicely.
| > >>>
| > >>> Steve, hope you don't mind. I think the script is great.
| > >>> I have modified it myself (see my website) to place the
background
| > >>> image in a grey box, centered horizontally, with grey rounded
corners,
| > >>> but that's just an added bell (or is a whistle?) Marc, I can send
| > >>> details of how to do this, but the rounded corners are a bit
tricky.
| > >>>
| > >>> --
| > >>> Cheers,
| > >>> Trevor L.
| > >>> Website: http://tandcl.homemail.com.au
| > >>>
| > >>
| > >>
| > >
| > >
| >
| >
| >
 
Yes it's instant. But how? I'm still a beginner using Front Page for a week
now. F1 can't help me.

Murray said:
Post a link to the page after it's been uploaded somewhere.

Solving a problem like this by forcing the browser viewport to maximize is
like solving a headache with a 45 caliber bullet....

--
Murray
--------------
MVP FrontPage


KittyKat said:
Understan perfectly. But I have a problem with a top frame menubar
disappearing. i tried to absolute position it, but it didn't work. Anyone
that can help? I will email the code and needed content if so requested.

Stefan B Rusynko said:
IMHO
Unless you are running a PC based Kiosk
Design your web to adjust to the Users settings
- don't force a users browser to change size to suit your design
(it is their choice what browser size they want)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have a similar question. I wish toopen my web site in a maximized
state
| from the start. Can you help please.
|
|
| "Murray" wrote:
|
| > It does - what I'm more concerned about is having the Mac dynamically
resize
| > the page based on the image's size. That has been problematic in the
past -
| > something about how the Mac manages images or something....
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Hi Murray,
| > > As Trevor mentioned this is just something I've been playing with
because
| > > I think it's possible to point a script at a folder full of images
and
| > > create the links "on the fly."
| > >
| > > That said. I've not tried it on a Mac. But, if a Mac supports
JavaScript
| > > that's been around since the days of Mosaic, it "should work."
| > >
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > >
| > >
| > > | > >> Trevor - have you or Steve tried this on Macs?
| > >>
| > >> --
| > >> Murray
| > >> --------------
| > >> MVP FrontPage
| > >>
| > >>
| > >> | > >>> MarcParnes wrote:
| > >>>> Hi,
| > >>>> I have a thumbnail that opens a smallish picture in a new
browser
| > >>>> window. I'd like to control the size of the new window so its
about
| > >>>> the same size as the picture. Now it opens up a fullscreen
window
| > >>>> which dwarfs the picture. I've seen other sites that do that but
I
| > >>>> can't figure out how to do it in FP. Can someone help please?
| > >>>>
| > >>>> Thanks,
| > >>>> Marc
| > >>>
| > >>> Marc,
| > >>> FP won't do it by itself, but Steve Easton (MVP) and I have been
having
| > >>> a discussion over many threads about a script that will do it.
| > >>>
| > >>> Steve's script is below, with one small change (only he will know
what
| > >>> it is).
| > >>> Go to Code or HTML view and paste it between <head> and </head>:
| > >>> // =============== Script to paste ================
| > >>> <script type="text/javascript">
| > >>> var img , imageToLoad , sVarA , sVarRS
| > >>> var newwindow , newdocument , sToPass
| > >>> function newWindow(img)
| > >>> {
| > >>> 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()
| > >>> {
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>> sVarRS = 'onload="resizeTo(' + imageToLoad.width + ',' +
| > >>> imageToLoad.height + ')"'
| > >>>
| > >>> sToPass='<html><head>\n'
| > >>> + '<style type="text/css"> body{ background-repeat:
| > >>> no-repeat; }</style>\n'
| > >>> + '<title>' + img + '</title>\n'
| > >>> + '</head>\n'
| > >>> + '<body ' + sVarRS + ' background=' + img + '>\n'
| > >>> + '</body></html>'
| > >>> //check to see if we have the dimensions and if not, go back
and
| > >>> wait another 1 second
| > >>> if ( imageToLoad.width == 0 ){ testit() }
| > >>> else
| > >>> newwindow = window.open('','',sVarA)
| > >>> newdocument = newwindow.document
| > >>> newdocument.write(sToPass)
| > >>> newdocument.close()
| > >>> }
| > >>> //--- End loadit() ---
| > >>> }
| > >>> //--- End testit() ---
| > >>> }
| > >>> </script>
| > >>> // =============== End of Script ================
| > >>>
| > >>> Call it from HTML by
| > >>> <a href="#" onclick="newWindow('mypicture.jpg')">
| > >>> <img src="mypicture_t.jpg" alt=" ">My picture</a>
| > >>> Change:
| > >>> 'mypicture.jpg' to the name of your image
| > >>> "mypicture_t.jpg" to the name of your thumbnail image
| > >>> 'My picture' to your caption
| > >>>
| > >>> You can change the position of the page by left and top in this
line
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>>
| > >>> I found it works quite nicely.
| > >>>
| > >>> Steve, hope you don't mind. I think the script is great.
| > >>> I have modified it myself (see my website) to place the
background
| > >>> image in a grey box, centered horizontally, with grey rounded
corners,
| > >>> but that's just an added bell (or is a whistle?) Marc, I can send
| > >>> details of how to do this, but the rounded corners are a bit
tricky.
| > >>>
| > >>> --
| > >>> Cheers,
| > >>> Trevor L.
| > >>> Website: http://tandcl.homemail.com.au
| > >>>
| > >>
| > >>
| > >
| > >
| >
| >
| >
 
Show me your page, please.

--
Murray
--------------
MVP FrontPage


KittyKat said:
Yes it's instant. But how? I'm still a beginner using Front Page for a
week
now. F1 can't help me.

Murray said:
Post a link to the page after it's been uploaded somewhere.

Solving a problem like this by forcing the browser viewport to maximize
is
like solving a headache with a 45 caliber bullet....

--
Murray
--------------
MVP FrontPage


KittyKat said:
Understan perfectly. But I have a problem with a top frame menubar
disappearing. i tried to absolute position it, but it didn't work.
Anyone
that can help? I will email the code and needed content if so
requested.

:

IMHO
Unless you are running a PC based Kiosk
Design your web to adjust to the Users settings
- don't force a users browser to change size to suit your design
(it is their choice what browser size they want)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have a similar question. I wish toopen my web site in a maximized
state
| from the start. Can you help please.
|
|
| "Murray" wrote:
|
| > It does - what I'm more concerned about is having the Mac
dynamically
resize
| > the page based on the image's size. That has been problematic in
the
past -
| > something about how the Mac manages images or something....
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Hi Murray,
| > > As Trevor mentioned this is just something I've been playing
with
because
| > > I think it's possible to point a script at a folder full of
images
and
| > > create the links "on the fly."
| > >
| > > That said. I've not tried it on a Mac. But, if a Mac supports
JavaScript
| > > that's been around since the days of Mosaic, it "should work."
| > >
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > >
| > >
| > > | > >> Trevor - have you or Steve tried this on Macs?
| > >>
| > >> --
| > >> Murray
| > >> --------------
| > >> MVP FrontPage
| > >>
| > >>
| > >> | > >>> MarcParnes wrote:
| > >>>> Hi,
| > >>>> I have a thumbnail that opens a smallish picture in a new
browser
| > >>>> window. I'd like to control the size of the new window so its
about
| > >>>> the same size as the picture. Now it opens up a fullscreen
window
| > >>>> which dwarfs the picture. I've seen other sites that do that
but
I
| > >>>> can't figure out how to do it in FP. Can someone help please?
| > >>>>
| > >>>> Thanks,
| > >>>> Marc
| > >>>
| > >>> Marc,
| > >>> FP won't do it by itself, but Steve Easton (MVP) and I have
been
having
| > >>> a discussion over many threads about a script that will do it.
| > >>>
| > >>> Steve's script is below, with one small change (only he will
know
what
| > >>> it is).
| > >>> Go to Code or HTML view and paste it between <head> and
</head>:
| > >>> // =============== Script to paste ================
| > >>> <script type="text/javascript">
| > >>> var img , imageToLoad , sVarA , sVarRS
| > >>> var newwindow , newdocument , sToPass
| > >>> function newWindow(img)
| > >>> {
| > >>> 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()
| > >>> {
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>> sVarRS = 'onload="resizeTo(' + imageToLoad.width + ',' +
| > >>> imageToLoad.height + ')"'
| > >>>
| > >>> sToPass='<html><head>\n'
| > >>> + '<style type="text/css"> body{
background-repeat:
| > >>> no-repeat; }</style>\n'
| > >>> + '<title>' + img + '</title>\n'
| > >>> + '</head>\n'
| > >>> + '<body ' + sVarRS + ' background=' + img + '>\n'
| > >>> + '</body></html>'
| > >>> //check to see if we have the dimensions and if not, go
back
and
| > >>> wait another 1 second
| > >>> if ( imageToLoad.width == 0 ){ testit() }
| > >>> else
| > >>> newwindow = window.open('','',sVarA)
| > >>> newdocument = newwindow.document
| > >>> newdocument.write(sToPass)
| > >>> newdocument.close()
| > >>> }
| > >>> //--- End loadit() ---
| > >>> }
| > >>> //--- End testit() ---
| > >>> }
| > >>> </script>
| > >>> // =============== End of Script ================
| > >>>
| > >>> Call it from HTML by
| > >>> <a href="#" onclick="newWindow('mypicture.jpg')">
| > >>> <img src="mypicture_t.jpg" alt=" ">My picture</a>
| > >>> Change:
| > >>> 'mypicture.jpg' to the name of your image
| > >>> "mypicture_t.jpg" to the name of your thumbnail image
| > >>> 'My picture' to your caption
| > >>>
| > >>> You can change the position of the page by left and top in
this
line
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>>
| > >>> I found it works quite nicely.
| > >>>
| > >>> Steve, hope you don't mind. I think the script is great.
| > >>> I have modified it myself (see my website) to place the
background
| > >>> image in a grey box, centered horizontally, with grey rounded
corners,
| > >>> but that's just an added bell (or is a whistle?) Marc, I can
send
| > >>> details of how to do this, but the rounded corners are a bit
tricky.
| > >>>
| > >>> --
| > >>> Cheers,
| > >>> Trevor L.
| > >>> Website: http://tandcl.homemail.com.au
| > >>>
| > >>
| > >>
| > >
| > >
| >
| >
| >
 
I'm not allowed by the company to upload the page.
But can I maybe email you the details. If able.
It would be a great help. Sorry for all the hassle!

Murray said:
Show me your page, please.

--
Murray
--------------
MVP FrontPage


KittyKat said:
Yes it's instant. But how? I'm still a beginner using Front Page for a
week
now. F1 can't help me.

Murray said:
Post a link to the page after it's been uploaded somewhere.

Solving a problem like this by forcing the browser viewport to maximize
is
like solving a headache with a 45 caliber bullet....

--
Murray
--------------
MVP FrontPage


Understan perfectly. But I have a problem with a top frame menubar
disappearing. i tried to absolute position it, but it didn't work.
Anyone
that can help? I will email the code and needed content if so
requested.

:

IMHO
Unless you are running a PC based Kiosk
Design your web to adjust to the Users settings
- don't force a users browser to change size to suit your design
(it is their choice what browser size they want)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have a similar question. I wish toopen my web site in a maximized
state
| from the start. Can you help please.
|
|
| "Murray" wrote:
|
| > It does - what I'm more concerned about is having the Mac
dynamically
resize
| > the page based on the image's size. That has been problematic in
the
past -
| > something about how the Mac manages images or something....
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Hi Murray,
| > > As Trevor mentioned this is just something I've been playing
with
because
| > > I think it's possible to point a script at a folder full of
images
and
| > > create the links "on the fly."
| > >
| > > That said. I've not tried it on a Mac. But, if a Mac supports
JavaScript
| > > that's been around since the days of Mosaic, it "should work."
| > >
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > >
| > >
| > > | > >> Trevor - have you or Steve tried this on Macs?
| > >>
| > >> --
| > >> Murray
| > >> --------------
| > >> MVP FrontPage
| > >>
| > >>
| > >> | > >>> MarcParnes wrote:
| > >>>> Hi,
| > >>>> I have a thumbnail that opens a smallish picture in a new
browser
| > >>>> window. I'd like to control the size of the new window so its
about
| > >>>> the same size as the picture. Now it opens up a fullscreen
window
| > >>>> which dwarfs the picture. I've seen other sites that do that
but
I
| > >>>> can't figure out how to do it in FP. Can someone help please?
| > >>>>
| > >>>> Thanks,
| > >>>> Marc
| > >>>
| > >>> Marc,
| > >>> FP won't do it by itself, but Steve Easton (MVP) and I have
been
having
| > >>> a discussion over many threads about a script that will do it.
| > >>>
| > >>> Steve's script is below, with one small change (only he will
know
what
| > >>> it is).
| > >>> Go to Code or HTML view and paste it between <head> and
</head>:
| > >>> // =============== Script to paste ================
| > >>> <script type="text/javascript">
| > >>> var img , imageToLoad , sVarA , sVarRS
| > >>> var newwindow , newdocument , sToPass
| > >>> function newWindow(img)
| > >>> {
| > >>> 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()
| > >>> {
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>> sVarRS = 'onload="resizeTo(' + imageToLoad.width + ',' +
| > >>> imageToLoad.height + ')"'
| > >>>
| > >>> sToPass='<html><head>\n'
| > >>> + '<style type="text/css"> body{
background-repeat:
| > >>> no-repeat; }</style>\n'
| > >>> + '<title>' + img + '</title>\n'
| > >>> + '</head>\n'
| > >>> + '<body ' + sVarRS + ' background=' + img + '>\n'
| > >>> + '</body></html>'
| > >>> //check to see if we have the dimensions and if not, go
back
and
| > >>> wait another 1 second
| > >>> if ( imageToLoad.width == 0 ){ testit() }
| > >>> else
| > >>> newwindow = window.open('','',sVarA)
| > >>> newdocument = newwindow.document
| > >>> newdocument.write(sToPass)
| > >>> newdocument.close()
| > >>> }
| > >>> //--- End loadit() ---
| > >>> }
| > >>> //--- End testit() ---
| > >>> }
| > >>> </script>
| > >>> // =============== End of Script ================
| > >>>
| > >>> Call it from HTML by
| > >>> <a href="#" onclick="newWindow('mypicture.jpg')">
| > >>> <img src="mypicture_t.jpg" alt=" ">My picture</a>
| > >>> Change:
| > >>> 'mypicture.jpg' to the name of your image
| > >>> "mypicture_t.jpg" to the name of your thumbnail image
| > >>> 'My picture' to your caption
| > >>>
| > >>> You can change the position of the page by left and top in
this
line
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>>
| > >>> I found it works quite nicely.
| > >>>
| > >>> Steve, hope you don't mind. I think the script is great.
| > >>> I have modified it myself (see my website) to place the
background
| > >>> image in a grey box, centered horizontally, with grey rounded
corners,
| > >>> but that's just an added bell (or is a whistle?) Marc, I can
send
| > >>> details of how to do this, but the rounded corners are a bit
tricky.
| > >>>
| > >>> --
| > >>> Cheers,
| > >>> Trevor L.
| > >>> Website: http://tandcl.homemail.com.au
| > >>>
| > >>
| > >>
| > >
| > >
| >
| >
| >
 
Murray,

I too have a similar problem. I have links to pdf docs that i want to open
full screen. For some reason, when I click the link, they are not full screen
and maximize has been disabled? Any help? Here is the website:
http://www.geosim3d.com. Then navigate to the "Samples" page and click the
link that says "Accident Forensics, El Campo, TX" and you'll see what I'm
talking about. THANKS!

Murray said:
Show me your page, please.

--
Murray
--------------
MVP FrontPage


KittyKat said:
Yes it's instant. But how? I'm still a beginner using Front Page for a
week
now. F1 can't help me.

Murray said:
Post a link to the page after it's been uploaded somewhere.

Solving a problem like this by forcing the browser viewport to maximize
is
like solving a headache with a 45 caliber bullet....

--
Murray
--------------
MVP FrontPage


Understan perfectly. But I have a problem with a top frame menubar
disappearing. i tried to absolute position it, but it didn't work.
Anyone
that can help? I will email the code and needed content if so
requested.

:

IMHO
Unless you are running a PC based Kiosk
Design your web to adjust to the Users settings
- don't force a users browser to change size to suit your design
(it is their choice what browser size they want)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:

http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have a similar question. I wish toopen my web site in a maximized
state
| from the start. Can you help please.
|
|
| "Murray" wrote:
|
| > It does - what I'm more concerned about is having the Mac
dynamically
resize
| > the page based on the image's size. That has been problematic in
the
past -
| > something about how the Mac manages images or something....
| >
| > --
| > Murray
| > --------------
| > MVP FrontPage
| >
| >
| > | > > Hi Murray,
| > > As Trevor mentioned this is just something I've been playing
with
because
| > > I think it's possible to point a script at a folder full of
images
and
| > > create the links "on the fly."
| > >
| > > That said. I've not tried it on a Mac. But, if a Mac supports
JavaScript
| > > that's been around since the days of Mosaic, it "should work."
| > >
| > >
| > > --
| > > Steve Easton
| > > Microsoft MVP FrontPage
| > > 95isalive
| > > This site is best viewed............
| > > .......................with a computer
| > >
| > >
| > >
| > > | > >> Trevor - have you or Steve tried this on Macs?
| > >>
| > >> --
| > >> Murray
| > >> --------------
| > >> MVP FrontPage
| > >>
| > >>
| > >> | > >>> MarcParnes wrote:
| > >>>> Hi,
| > >>>> I have a thumbnail that opens a smallish picture in a new
browser
| > >>>> window. I'd like to control the size of the new window so its
about
| > >>>> the same size as the picture. Now it opens up a fullscreen
window
| > >>>> which dwarfs the picture. I've seen other sites that do that
but
I
| > >>>> can't figure out how to do it in FP. Can someone help please?
| > >>>>
| > >>>> Thanks,
| > >>>> Marc
| > >>>
| > >>> Marc,
| > >>> FP won't do it by itself, but Steve Easton (MVP) and I have
been
having
| > >>> a discussion over many threads about a script that will do it.
| > >>>
| > >>> Steve's script is below, with one small change (only he will
know
what
| > >>> it is).
| > >>> Go to Code or HTML view and paste it between <head> and
</head>:
| > >>> // =============== Script to paste ================
| > >>> <script type="text/javascript">
| > >>> var img , imageToLoad , sVarA , sVarRS
| > >>> var newwindow , newdocument , sToPass
| > >>> function newWindow(img)
| > >>> {
| > >>> 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()
| > >>> {
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>> sVarRS = 'onload="resizeTo(' + imageToLoad.width + ',' +
| > >>> imageToLoad.height + ')"'
| > >>>
| > >>> sToPass='<html><head>\n'
| > >>> + '<style type="text/css"> body{
background-repeat:
| > >>> no-repeat; }</style>\n'
| > >>> + '<title>' + img + '</title>\n'
| > >>> + '</head>\n'
| > >>> + '<body ' + sVarRS + ' background=' + img + '>\n'
| > >>> + '</body></html>'
| > >>> //check to see if we have the dimensions and if not, go
back
and
| > >>> wait another 1 second
| > >>> if ( imageToLoad.width == 0 ){ testit() }
| > >>> else
| > >>> newwindow = window.open('','',sVarA)
| > >>> newdocument = newwindow.document
| > >>> newdocument.write(sToPass)
| > >>> newdocument.close()
| > >>> }
| > >>> //--- End loadit() ---
| > >>> }
| > >>> //--- End testit() ---
| > >>> }
| > >>> </script>
| > >>> // =============== End of Script ================
| > >>>
| > >>> Call it from HTML by
| > >>> <a href="#" onclick="newWindow('mypicture.jpg')">
| > >>> <img src="mypicture_t.jpg" alt=" ">My picture</a>
| > >>> Change:
| > >>> 'mypicture.jpg' to the name of your image
| > >>> "mypicture_t.jpg" to the name of your thumbnail image
| > >>> 'My picture' to your caption
| > >>>
| > >>> You can change the position of the page by left and top in
this
line
| > >>> sVarA = ("left=20px" + ",top=20px" + ",width=" +
imageToLoad.width
| > >>> + ",height=" + imageToLoad.height)
| > >>>
| > >>> I found it works quite nicely.
| > >>>
| > >>> Steve, hope you don't mind. I think the script is great.
| > >>> I have modified it myself (see my website) to place the
background
| > >>> image in a grey box, centered horizontally, with grey rounded
corners,
| > >>> but that's just an added bell (or is a whistle?) Marc, I can
send
| > >>> details of how to do this, but the rounded corners are a bit
tricky.
| > >>>
| > >>> --
| > >>> Cheers,
| > >>> Trevor L.
| > >>> Website: http://tandcl.homemail.com.au
| > >>>
| > >>
| > >>
| > >
| > >
| >
| >
| >
 
Back
Top