Results 1 to 2 of 2

Thread: All I wanted for christmas :-/

  1. #1
    Join Date
    Dec 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy All I wanted for christmas :-/

    I posted this problem originally at december, 16th, but haven't received any answers. Is it really possible that there isn't any solution, or that nobody knows the solution?? Well, I try one more shot, pleaze post me an answer if you can help me!

    I use the following code to open a new page, or more precisely, a frameset of several pages, in full screen mode:

    <script>
    function fullwin(targeturl) {
    window.open(targeturl,"","fullscreen,scrollbars")
    }
    </script>

    <form>
    <input type="button" onClick="fullwin('mypage.html')" value="Show My Frameset">
    </form>

    (My last problem was related to the same script , I needed a code to make users able to close this fullscreen window.)

    Problem 1
    This script opens a new window when button is pushed. When the full screen window is closed down, this page with the button is still on the screen. I want the new page to load in the same window, that is, replacing the contents in the window, like target="_top"

    Q1: Can somebody out there see how I can modify or rewrite the code so that the new page loads in the same window?

    Problem 2
    I've modifed the latter part to the following:

    <form>
    <input type="button" onClick="window.close(); fullwin('mypage.html')" value="Show My Frameset">
    </form>

    The above code closes the initial window before the new pages were loaded into a new window in full screen mode, BUT, the browser is showing an alert; "The page you are viewing are trying to close the window. Are you sure you want to close the window (Yes/No)". (Or something like that :-/ )

    Q2: Do somebody out there know how to close the first window, whitout showing any alert? The first window should close while the new one was loading, whitout asking the user anything!

    If someone is able to help me with one of these questions, my problem is solved. I would appriciate it an be very greatful!!! If you know the answer of either Q1 or Q2, or both, please post me an answer! :-) TNX!!

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by JS Novice
    <script>
    A script element requires a type attribute:

    HTML Code:
    <script type="text/javascript">
    <form>
    <input type="button" onClick="fullwin('mypage.html')" value="Show My Frameset">
    </form>
    If you're not using a form control (input, textarea, etc) to submit a value to a server, there's no point in including a form element.

    Q1: Can somebody out there see how I can modify or rewrite the code so that the new page loads in the same window?
    So are you basically asking: "How can I make the current window fullscreen"? If not, you'll need to rephrase this question.

    Q2: Do somebody out there know how to close the first window, whitout showing any alert?
    You could exploit a bug in IE, however one would anticipate that this security hole would be closed at some point. In short: you can't (or at least shouldn't).

    Mike

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
  •