You need to determine the user's screen resolution then use javascript to dynamically open a new window using the window.open method. If you look at any cut and paste javascript site there are many variations of this script available out there.
------------------
Wayne Luke
The Majormud Encyclopedia - www.bloodquest2.com
Come Play one of the hottest games on the net.
<a href="javascriptopWin('images/photos/scwb07.jpg')">Click here for image</a>
but have found that FrontPage98 does not "look in" Javascripts and so mistakenly treats images as orphans.
As we have to clear off about 150-250 real orphan images per month, we need to know the difference.
That is why was hoping there was a way to do it in HTML.
Was also wondering if there was something in Javascript that may be able to be used "on load" to set a new window to open full size during the session, but have not got the expertise to figure it out.
The second (in present form) is a form type script which opens a full window when button is clicked. You can combine and modify these to suit your needs pretty easily:
(Note: cut and paste this to note pad so you can actually read it)
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function openFullscreen(page) {
var yes = 1;
var no = 0;
var menubar = no; // The File, Edit, View Menus
var scrollbars = no; // Horizontal and vertical scrollbars
var locationbar = no; // The location box with the site URL
var directories = no; // the "What's New", "What Cool" links
var resizable = no; // Can the window be resized?
var statusbar = no; // Status bar (with "Document: Done")
var toolbar = no; // Back, Forward, Home, Stop toolbar
is sort of in the right direction, but it needs to affect any "new" windows that are opened, not just maximising the "present" one.
Have already sucessfully tried the second part thus
IN HEADER
<script language="JavaScript1.2">
<!-- Begin
function popWin(page) {
OpenWin = this.open(page, "CtrlWindow", "width=" + (screen.width-10) + ",height=" + (screen.height-50) + ",left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,directories=no,location=no");
}
// End -->
</script>
IN BODY
<a href="javascriptopWin('images/photos/scwb07.jpg')">Click here for image</a>
But FrontPage98 treats scwb07.jpg as an orphan, and that is why I am looking for a solution in HTML or "on load" as you have hinted at in Part 1.
I put Part 1 *on* (or *in* I guess you'd say), the new page that you want to be full size.
It isn't meant to be put on whatever page you are calling the new window from. Make sense?
Any page with part 1 in the headers will open fully. Hope it helps... and like I said, you can more or less use those two to do a whole bunch of different things depending on what your desired need is.
It is not a new HTML page I want to maximise, (the Javascripts above will do that just fine, thanks) its the image in the new screen called by the following,
The idea is to click on a thumnail image to bring up the full size image
so there is no HTML page which to stick code in, just a browser call to open a new window to view the image.
When I sucessfully used Javascript to do it
thus
<a href="javascriptopWin('fullsizeimage.jpg')"><img src="thumbnail.jpg"></a>
FrontPage98 claims (wrongly) that "fullsizeimage.jpg" is an orphan and therefore can be deleted.
It seems that FP98 ignores Javascripts.
So this is why I would like to know if there are any further commands to "target=" like size=, fullsize=, maximise=,screen=full?, which control the size of the screen the browser will open or
instead of "_blank" can you put something else? ie create an HTML page for it to use ?.
(I have tried viewer & viewer.htm instead of _blank, but it seems to ignore it)
I personally consider it bad form to just open a page with a graphic on it. Your requiring the user to use the browser as your interface. It would be a much better user experience if you wrapped the images in html with links to home, next image, previous image and other relevant links. That way the user stays within your interface and the branding of your site is more complete.
------------------
Wayne Luke
The Majormud Encyclopedia - www.bloodquest2.com
Come Play one of the hottest games on the net.
popWin must be one of the most widely used JavaScripts around.
The browser window which opens can have all the navigation you need, (or let them have)besides.
We sell on our site and if somebody likes something and is looking to buy it, then they like to see it fullscreen, so they "click" on the thumbnail to get the full size image.
They are not interested in hareing off all over the place, or whether it is good form of not, they just want to have a good look at a full size image.
Often they will look at two or three items before deciding to purchase.
We used to have the full size image come up in the same screen, but now because the page sizes are so big, hitting the <BACK> takes too long as all the thumbnails have to re-load, so we are calling a new screen to view the full size images.
Yes, we could split our pages up, but that complicates navigation & creates havoc with the search engines placings.
You try telling your links to link to "#" and then using the onClick event to open the new window with the image???
It would look like:
<a href="#" onClick="popWin('attribute','attribute')"><img stuff here></a>
That shouldn't be considered an orphan because # refers to the current page. It just creates a dead link though some browsers might scroll to the top of the page.
------------------
Wayne Luke
The Majormud Encyclopedia - www.bloodquest2.com
Come Play one of the hottest games on the net.
Bookmarks