Results 1 to 4 of 4

Thread: Pages Being Loaded 'naked' . . . frames & java

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97

    Pages Being Loaded 'naked' . . . frames & java

    ok so i've got a little further .... the following code allows u to redirect a user back to a frameset if the page is loaded outside of its original frameset.

    PHP Code:
    <script>
                if (
    window.name!='Main'
                
    && !((self.innerHeight == 0) && (self.innerWidth == 0)))
                
    top.location.replace('frame1024.htm?Home.aspx~main');
            </
    script
    now i need to add an else statement to detect there screen size ... how do i do this


    many thanks
    optimus

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    There is no cross-browser way for this. In IE you can use the screen object.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97
    yeah i've got some code for that 2secs

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97
    @ the mo my code on my index page redirects the users to the required frame but ... im not so brilliant with java/html n need to know how to edit the above piece of code to do what this one does kind of


    PHP Code:
    var correctwidth=1024
                        
    var correctheight=768
                        
    if (screen.width!=correctwidth||screen.height!=correctheight)
                        
    MM_goToURL('parent','frame800.htm'); 
    so the process of events would be

    if ... not loaded in frame then
    if ... 1024x768 redirect to frame1024.htm
    else ...800x600 redirect to frame800.htm
    end if
    end if

Posting Permissions

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



Click Here to Expand Forum to Full Width