Results 1 to 17 of 17

Thread: Refresh Page once

  1. #1

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Refresh Page once

    Hello,

    does anyone know how to refresh a page once when it loads for first time?
    Either with javascript or vbscript or anything else.

    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Refresh Page once

    Why? Sounds awfully distracting.

  3. #3
    Member
    Join Date
    Dec 2006
    Location
    Malaysia
    Posts
    53

    Re: Refresh Page once

    You need cookie to save a setting and then when the user open this page again, it will no refresh for second time.

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Refresh Page once

    And for users that don't accept/support cookies, the page will refresh continuously. Sounds like a fantastic plan.

  5. #5

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Re: Refresh Page once

    1) Penagate, you don't need to know why I need this.
    2) Kevin1991, the cookie way works but as penagate said, when someone has cookies disabled, then what?

    Anyone else?
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Refresh Page once

    People who help as much as penagate dont tend to ask pointless questions.. even if you don't understand what the point of the question, is it is a good idea to answer.

    If you can explain "why" (or what you are trying to achieve by refreshing the page), a suitable alternative can be suggested.

  7. #7
    Member
    Join Date
    Dec 2006
    Location
    Malaysia
    Posts
    53

    Cool Re: Refresh Page once

    I think cookies is the best way, or you can save setting in profile database.

    But the user must register first...
    Last edited by Kevin1991; Feb 3rd, 2007 at 01:38 AM.

  8. #8

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Re: Refresh Page once

    Quote Originally Posted by si_the_geek
    People who help as much as penagate dont tend to ask pointless questions.. even if you don't understand what the point of the question, is it is a good idea to answer.

    If you can explain "why" (or what you are trying to achieve by refreshing the page), a suitable alternative can be suggested.

    ok. Well, I have a personal web site for my software/web hosting company. (www.botonakis.com), when you load the page with mozilla firefox, i doesn't load the images correctly on all pages. After I refresh all the images are ok.

    So I need a way to refresh once the page when the browser is mozilla. I have already written a javascript to check the browser but I can't find a way to refresh once.
    Last edited by DarkX_Greece; Dec 17th, 2009 at 06:00 PM.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  9. #9
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Refresh Page once

    It works perfectly for me.

  10. #10

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Re: Refresh Page once

    No the first page and only with Firefox. With Internet Explorer 6/7 works perfect.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  11. #11
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Refresh Page once

    Again: it works perfectly for me. (In Firefox.) I see zero difference after refreshing the page.

  12. #12
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Refresh Page once

    Same here, it works fine for me without a refresh. (Fx 2)

    I would guess that the problem is with your installation/configuration of Firefox

  13. #13

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Re: Refresh Page once

    Quote Originally Posted by penagate
    Again: it works perfectly for me. (In Firefox.) I see zero difference after refreshing the page.
    That's what i am telling you, after the refreshing it's perfect. So I need an automate refresh once script.


    si_the_geek: I had the same problem and at 2 internet cafes that I used and some pcs from my company, so it's not the installation or something.
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  14. #14
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Refresh Page once

    Oh, I think I might see it now. Like this? (Attached.)
    Attached Images Attached Images  

  15. #15
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Refresh Page once

    Replace all those tables with CSS.

  16. #16

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Re: Refresh Page once

    See? I told you!

    I will try it and I will reply. Thanks!
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  17. #17
    Hyperactive Member Coool's Avatar
    Join Date
    Feb 2006
    Location
    System.Coool
    Posts
    333

    Re: Refresh Page once

    what u can do is

    1. Make one hidden field and save the session variable in it
    2. make one function that check the value of hidden field and upon which submit form
    3. on Body's onLoad event call the function that submit form

    hope it works
    I am using .NET 2010 with Windows 7

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