Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reload Window when user resizes it

    Hi folks,

    I have problems with some js-items on my page: when the user resizes the window, the menubars position is wrong, only after a reload its o.k.!

    where can I find a script that reloads the page when the user has resized the browser window?

    Thanks a lot!
    moguai

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    1. Go to Google.
    2. Type the words "javascript", "reload" and "resize".
    3. Clicky clicky.

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Try

    <body onresize="self.location='the_same_URL'">
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #4
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Spudhead
    1. Go to Google.
    2. Type the words "javascript", "reload" and "resize".
    3. Clicky clicky.
    is it a stupid question? believe it or not, I COME from Google... (and this site here is known to be very good!)

  • #5
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    anyway... you forget to tell us if my advice worked for you...
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #6
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Kor
    Try

    <body onresize="self.location='the_same_URL'">
    I tried but it did not work
    I put this in the head tag <script language="javascript" type="text/javascript"></script>

    ok?

  • #7
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    ok, a more direct approach:

    http://javascript.internet.com/page-...on-resize.html

    or, to make it even more straightforward:

    make your <body> tag look like this:

    <BODY onResize="window.location.href = window.location.href;">

    You don't need anything in the <head>


  •  

    Posting Permissions

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