Is there a code to refresh the page?

Discussion in 'HTML & Website Design' started by wishmaster22, Jul 10, 2006.

  1. #1
    I am looking for a way to make a button to refresh the contents of a page. I have tons of articles on my site and have it set to show 10 at a time. It would be nice to have a button that says click here for 10 more articles and have it just refresh the page. Or should I just make a button with a link back to the same page?

    THanks
     
    wishmaster22, Jul 10, 2006 IP
  2. shamess

    shamess Well-Known Member

    Messages:
    1,127
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    185
    #2
    I guess the articles on the pages are randomised?

    You could do this:

    <form action="?"><input type="submit" value="Refresh!"></form>

    And that'd load the page again.
     
    shamess, Jul 10, 2006 IP
  3. hiren_hirani

    hiren_hirani Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Put this in Your Page which you want to automatically refresh
    <html><head>
    <meta http-equiv="refresh" content="Refresh Time Here (In Seconds); URL=http://YOUR URL">
    </head>
    </html>
     
    hiren_hirani, Jul 10, 2006 IP
  4. Solomon

    Solomon Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    maybe it will be suitable to use link on the main page (or page u want to refresh). But u need not to use caching in metatags.
     
    Solomon, Jul 12, 2006 IP
  5. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #5
    this is another way to do it adding style to your button, instead of plain gray:

    
    <button style="background:red: color:white;" type="submit" value="Refresh!">Refresh!</button>
    
    Code (markup):
    the above produces a red button with white letters that you can change for any color at your convenience.

    Otherwise you can also use javascript this way:

    
    <a href="javascript: window.location.reload()">refresh page</a>
    
    Code (markup):
    in both cases you can add an image instead of text.
     
    Mystique, Jul 12, 2006 IP
  6. wishmaster22

    wishmaster22 Banned

    Messages:
    135
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks ,

    I got it straight. Your ideas got me thru it!

    Awesome Help here!
     
    wishmaster22, Jul 14, 2006 IP