Advanced Search

Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Help - Code discrepency - Full Screen code

  1. #1
    Join Date
    Apr 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help - Code discrepency - Full Screen code

    I am apply code from: http://www.dynamicdrive.com/dynamicindex8/window1.htm

    Locally this code works great...The wiondow pops open and I see nothing but the code on the page...No Header bar, no footer bar, no tool bars. YET, when I open the page from the remote server, the header strip and footer strip display. Question? Why?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Security measures.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Apr 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Follow-up

    Hi. COuld you elaborate on the answer "Restrictions"? Thanks.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,709
    Thanks
    43
    Thanked 3,134 Times in 3,098 Posts
    Blog Entries
    12

    Default

    Since, without at least the title and status bars, it would be very easy to fool someone into thinking that they were somewhere else on the web than they actually are, this has been impossible to remove from a live window for quite some time.

    Your desire to do this is probably innocent enough but, professional thieves would love to be able to do this to scam folks into thinking that they are on the official website of, say - a bank, when in fact they are submitting personal information directly to the thieves.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    May 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Maybe, the code in the remote server for that button is different from that in the text you copied
    Last edited by lihang; 05-10-2006 at 07:33 AM.

  6. #6
    Join Date
    Apr 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Focus In

    Hi all.

    Thank you for participating on this thread. Please note that I have resolved the issue of my initial inquiry with success.

    Please visit this site:

    http://www.pageresource.com/jscript/jwinopen.htm

    I am able to do most of what I want with this code:

    ------------------

    if((FullScreenFlag == "Hidden Tool Bars") && (config != "YES")) {

    window.open(url1, "", "top=0,left=0,width=1024,height=768,scrollbars,toolbar=no,status=yes,menubar=no,directories=no,titlebar=yes");

    window.location = '../../users/dc4d/dc4d.html';

    --------------------

    My sticking point is the code: width=1024, height=768.

    I need the pop-up screen to be full screen, regardless of if I am on a 1024x768 calibrated monitor or a 1280x1024 calibrated monitor. I cannot simply set the width and height to a static variable as people set their monitors to different sizes.

    As far as everything else, as you all can see, creating a pop up box that ONLY displays the header strip and footer strip display is quite possible.

    If anyone has a lead on this, I'm all ears.

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    window.open(url1, "", "top=0,left=0,width=" + screen.width + ",height=" + screen.height + ",scrollbars,toolbar=no,status=yes,menubar=no,directories=no,titlebar=yes");
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Apr 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default docking the window

    Hi all.

    To Twey: your code:

    width=" + screen.width + ",height=" + screen.height + ",

    This works. Thank you. The only aspect that is off is that the window that pops open is not docked, it can be moved, and the window pops in a way that the screen's status bar is covered slighltly by my monitor's "black space" at the bottom of the IE window rather than having the effect that occurs when I click the "maximize" button at the top right hand corner of the page.

    Is there a way to dock and maximize the window upon popping it?

    All replies are, as always, appreciated.

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Not insofar as I know.
    and the window pops in a way that the screen's status bar is covered slighltly by my monitor's "black space"
    Then your monitor needs fiddling with. None of your desktop should be hidden.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,709
    Thanks
    43
    Thanked 3,134 Times in 3,098 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by kurson
    Hi all.

    To Twey: your code:

    width=" + screen.width + ",height=" + screen.height + ",

    This works. Thank you. The only aspect that is off is that the window that pops open is not docked, it can be moved, and the window pops in a way that the screen's status bar is covered slighltly by my monitor's "black space" at the bottom of the IE window rather than having the effect that occurs when I click the "maximize" button at the top right hand corner of the page.

    Is there a way to dock and maximize the window upon popping it?

    All replies are, as always, appreciated.
    For some reason. IE can't seem to calculate both the size that the window will be and the size of something like the screen width/height at the same time, include an allowance for the window's chrome and get it right. For this reason, in the past, I've always recommended setting the action of opening the window to a variable:

    Code:
    var newWin=window.open(whatever)
    newWin.moveTo(0,0);
    newWin.resizeTo(screen.width, screen.height);
    This will usually allow IE to get it right because, by that point, it has already got the window's chrome in place. You should still use whatever specifications for the window's size and position you desire in the window.open() method as, many other browsers will both 'get it right' the first time while also not allowing you to resize or move the window once it is open.

    Also, screen.availWidth and screen.availHeight are better choices here, that will make allowance for the the screen's taskbar (if any).

    I said, "in the past" because, although these practices are still sound and workable, it has come to my attention that there is an IE specific specification that (depending upon the type of window you want) may be superior to all this. It is the fullscreen specification:

    Code:
    if (document.body.filters) //IE only
    window.open('page.html','name','fullscreen')
    else
    window.open( . . . normal window open parameters and specifications . . .)
    You may not like the characteristics of this fullscreen window for your purposes though, in which case try the 'in the past' method.

    I am not aware of any way to prevent the moving of javascript opened windows other than polling, which would probably be a bad idea.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •