SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Member
    Join Date
    Jan 2000
    Location
    Dunedin, New Zealand
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you need to add to

    <a HREF="newpage.htm" target="_blank">Click Here for New Page</a>

    To make the new browser screen open full size?

    It is possible to have a Javascript at the top of the page setting the default size as full screen ?.

    Any help would be appreciated, Thanks

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.


  3. #3
    SitePoint Member
    Join Date
    Jan 2000
    Location
    Dunedin, New Zealand
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Luke, thanks for your reply.

    Have achieved it in Javascript. eg

    <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.

  4. #4
    Chicken
    SitePoint Community Guest
    I think I got a few things that would help you (do not ask me if this works for all broswers and which versions):

    First is js that you can have on any page which will open that page up full size:

    <SCRIPT language="JavaScript">

    <!--
    self.moveTo(0,0)
    self.resizeTo(screen.availWidth,screen.availHeight)
    //-->

    </SCRIPT>

    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

    windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-50) + ",top=0,left=0";

    windowprops += (menubar ? ",menubars" : "") +
    (scrollbars ? ",scrollbars" : "") +
    (locationbar ? ",location" : "") +
    (directories ? ",directories" : "") +
    (resizable ? ",resizable" : "") +
    (statusbar ? ",status" : "") +
    (toolbar ? ",toolbar" : "");

    window.open(page, 'fullPopup', windowprops);
    }
    // End -->
    </script>
    </HEAD>

    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->

    <BODY>

    <center>
    <form>
    <input type=button value="Open Fullscreen Page" onClick="openFullscreen('http://www.yahoo.com');">
    </form>
    </center>

    <p><center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>

    <!-- Script Size: 1.57 KB -->

    Hope this helps you!

    Chicken Nugget


  5. #5
    SitePoint Member
    Join Date
    Jan 2000
    Location
    Dunedin, New Zealand
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Chicken Nugget,

    The first part..

    <SCRIPT language="JavaScript">

    <!--
    self.moveTo(0,0)
    self.resizeTo(screen.availWidth,screen.availHeight)
    //-->

    </SCRIPT>

    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.

  6. #6
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Simple easy using the code above....

    <script language="javascript1.1">
    <!--
    function maximizeMe()
    {
    self.moveTo(0,0)
    self.resizeTo(screen.availWidth,screen.availHeight) }
    //-->
    </script>

    <body [colors, background, yadda yadda yadda] onLoad="maximizeMe();">
    some content
    </body>


    ------------------
    Wayne Luke

    The Majormud Encyclopedia - www.bloodquest2.com
    Come Play one of the hottest games on the net.



  7. #7
    Chicken
    SitePoint Community Guest
    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.

  8. #8
    SitePoint Member
    Join Date
    Jan 2000
    Location
    Dunedin, New Zealand
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Chicken Nugget & Wayne

    I think we have got a bit off the track.

    It was the poor example I gave at the start.

    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

    <a HREF="fullsizeimage.jpg" target="_blank"><img src="thumbnail.jpg"></a>

    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)

    <a HREF="fullsizeimage.jpg" target="_blank"><img src="thumbnail.jpg"></a>

    So how do you get to see fullsizeimage.jpg in a new full size screen ?

  9. #9
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.



  10. #10
    SitePoint Member
    Join Date
    Jan 2000
    Location
    Dunedin, New Zealand
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Wayne,

    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.

    Our site is not fancy, but it works.
    http://www.gales.co.nz

    Using popWin http://www.gales.co.nz/1scooper.htm

    Using Browser call target="_blank" http://www.gales.co.nz/1ralbert.htm

    feel the difference ?

    We had a great solution in popWin that fell apart because FP98 Explorer ignores JavaScripts.

    Hence our request for help.

  11. #11
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.



  12. #12
    SitePoint Member
    Join Date
    Jan 2000
    Location
    Dunedin, New Zealand
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Wayne,

    Have tried
    <a href="#" onClick="popWin('attribute','attribute')"><img stuff here></a>

    and FP98 still treats 'attrubute' as an orphan.

    Any more ideas ?.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •