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...
Printable View
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...
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.
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? :confused:
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?
A way to refresh a HTML page using VBScript.
What's wrong with using the metatag? As far as I know, there is no other way.
Nothing.... It's just that I'm not sure how to use HTML in my visual basic program...
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.
How do I specify the URL to refresh?
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.
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.
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...
Thankyou for your help :)
Anyone else care to help me!?