Results 1 to 13 of 13

Thread: Refreshing?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    Hell
    Posts
    29

    Unhappy Refreshing?

    Hey all,

    I'm trying to design a program that will refresh a specific page a number of times (or just carrys on till it's told to stop)... I've no idea how to do this... any help?

    Thanks in advance...
    Eternally Yours,

    Angelus.

  2. #2
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    meta tag

    Just use the refresh meta tag and specify after how many second you want the page to refresh. So if you want it to refresh every second, use this:

    <meta http-equiv="refresh" content="1">

    Hope this helps.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    Hell
    Posts
    29
    Is that HTML? Because I don't need the HTML way... I need a Visual Basic way... if it is a vb way.... how do I use it?
    Eternally Yours,

    Angelus.

  4. #4
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334
    Yes, that is an HTML tag. Are you writing a VB app or do you want a way to refresh an HTML page using VBScript?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    Hell
    Posts
    29
    A way to refresh a HTML page using VBScript.
    Eternally Yours,

    Angelus.

  6. #6
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334
    What's wrong with using the metatag? As far as I know, there is no other way.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    Hell
    Posts
    29
    Nothing.... It's just that I'm not sure how to use HTML in my visual basic program...
    Eternally Yours,

    Angelus.

  8. #8
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334
    OK, well when you're using VBScript, your HTML tags are still set up normally. So this is what your page would look like:

    Code:
    <html>
    <head>
    <title>Refreshing Page</title>
    <meta http-equiv="refresh" content="1"> 
    </head>
    
    <body>
    
    <script language="VBScript">
    Place your code here.....
    </script>
    
    </body>
    
    </html>
    
    There's no need for any VB code to refresh the page, the meta tag does it itself, regardless of your code.

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    Hell
    Posts
    29
    How do I specify the URL to refresh?
    Eternally Yours,

    Angelus.

  10. #10
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334
    Well, I assumed that you want to refresh the page that you placed the code in. So if you have it in index.html, it will refresh index.html. But if you want it to refresh to a new page, you will have to accept the default 5 second refresh rate, and specify the URL in the content parameter. So from index.html to news.html, you would do this:

    <meta http-equiv="refresh" content="news.html">

    So, when index.html is loaded, it waits 5 seconds until it loads news.html.

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    Hell
    Posts
    29
    Thats not what I wanted. The program will hopefully be used to refresh other pages that I (nor the program's user) has access to. For example, if you wanted to refresh a hit counter on another site, or to refresh the page on a site to get a random picture to text shown.
    Eternally Yours,

    Angelus.

  12. #12
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334
    OK, now I understand, although I'm not sure that I can help you.

    You would have to pass a refresh command to whatever browser you're using, and I don't how to do that...

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    Hell
    Posts
    29
    Thankyou for your help

    Anyone else care to help me!?
    Eternally Yours,

    Angelus.

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