Click to See Complete Forum and Search --> : Refresh HTML page!
ChrisM
Dec 14th, 1999, 04:45 PM
Hi
Does anyone know how to refresh a HTML page from within the HTML page using VB Script.
Many thanks in advance!
Here you go buddy.
You almost missed me. I'm hanging up Microsoft and going for LINUX etc.
VB Script, Java Script (another MS mugging)
So you want a VB Script way to do the HTML command for:
<META HTTP-EQUIV="refresh" CONTENT="10 <A HREF="http://www.yourdomain.com/yourpage.html">" TARGET=_blank>http://www.yourdomain.com/yourpage.html"></A>
where the 10 means refresh in 10 seconds?
Try
location.href = "http://www.yourdomain.com/yourpage.html"
but I don't know about the timing part for say "10 seconds".
The following code works for button clicks:
<HTML>
<TITLE>Here And There (Refresh Me)</TITLE>
<p>
<INPUT TYPE=BUTTON VALUE="Where am I?" NAME="cmdWhereAmI">
<INPUT TYPE=TEXT NAME="txtWhereAmI" size=100>
<p>
<INPUT TYPE=TEXT NAME="txtWhereAmIGoing" size=100>
<INPUT TYPE=BUTTON VALUE="Where am I going?" NAME="cmdWhereAmIGoing">
<p>
<CENTER>
<INPUT TYPE=BUTTON VALUE="Refresh (Reload) Current Page?" NAME="cmdRefresh">
</CENTER>
<SCRIPT LANGUAGE="VBScript">
Sub cmdWhereAmI_OnClick 'Event generated when Where am I Button is clicked
txtWhereAmI.Value = Location.href
'Load Text control with current location
End Sub 'End of event procedure
Sub cmdWhereAmIGoing_OnClick 'Event generated when Where am I going Button is clicked
if txtWhereAmIGoing.Value = "" then
txtWhereAmIGoing.Value = "http://EnterURL-to-go-to"
exit sub
end if
Location.href = txtWhereAmIGoing.Value
'Set new location, from Text control contents
End Sub 'End of event procedure
Sub cmdRefresh_OnClick 'Event generated when Refresh Current Page Button is clicked
Location.href = Location.href
'Set new location is the current location (Refresh the current page)
'YOUR ORIGINAL QUESTION...oh the suspense
End Sub 'End of event procedure
</SCRIPT>
</HTML>
Soon to be
VirtuallyLINUX---X-Windows
VirtuallyVB (retired)
Clunietp
Dec 15th, 1999, 03:53 PM
Linux is hype, VirtuallyVB -- actually, Linux made me appreciate Windows and how good us VB programmers have it.
You'll be back.......
:)
Clunietp
Dec 15th, 1999, 03:55 PM
Oh yeah, back up ALL data on your hard drive before installing Linux, it nuked all of my partitions during one of the installs (NOT operator error). Good Luck!
I've had Linux installed for months and it didn't blow away anything. I also reserved less hard drive space for Linux than Windows and it isn't even barely full. Windows (all Microsoft stuff) is a memory hog and basically doesn't deliver what they say it does. My only disappointment was that I didn't configure my modem right and couldn't connect to the Internet from Linux.
But, I just made a small network at home (2 pc's--real small) and I'll have internet access using Linux.
The only benefit of vb or vc++ 6 is the member drop-down box when you hit the dot or pointer notation. And then the code examples have typos anyway and are incomplete.
How about this one: The "WEBSTER" sample (which is a web server) only works with the Netscape browser and doesn't even work with Internet Explorer. What a joke!
I'll never pay for a Microsoft product again.
But I will pay for Linux, and it actually comes FREE.
Clunietp
Dec 16th, 1999, 09:25 AM
There are at least 6 or 7 companies that I know of that have their own version of linux. It is only a matter of time before each company adds their own proprietary features (or "enhancements") that render each version incompatible with each other.
That will mean your apps may not work across each flavor of linux. That will drive away developers. Microsoft has the spiral effect -- developers write software for windows because it is easier, and people buy windows software (which of course requires windows) because there is software.
Linux is not free if you have to spend countless hours of your time trying to configure the damn thing. How much is your time worth? Nothing? If your time is worth nothing, then Linux is free. Also, the companies are still making money off of linux, charging $$$ for an "official" CD and manual. Of course you can download it, but how many people do you really think downloaded the whole thing? And the time it took? was that free time also?
Linux, as it is, is a nice statement, but open source just does not work at a large scale. Companies will not invest millions in something just for the good of mankind, they want return on investment, and they will get it from linux users.
Do you think Joe Blow will want linux on his machine? Joe Blow wants to surf for internet porn while chatting with his AOL buddies: using windows. The majority of users out there are Joe Blows, and Joe Blow will not install linux. Joe Blow will choose Windows over Linux almost every time, and Linux must appeal to Joe Blow to be more than a too-little too-late operating system.
Look at Unix -- that has been around for 20-30 years, the market got splintered, and is now being killed by Microsoft.
The users will not follow until the apps do, and the app developers won't develop apps that can only be used by a fraction of their intended audiences. This situation is a downward spiral, and we know that is not good.
I had an open mind before trying Linux, but the combination of frustration and data loss made me a bit upset (not that I'm a stupid guy, just impatient), but my reasoning seems logical: Linux has no chance of taking over
Please convince me otherwise, I don't like a monopoly (M$) any more than the next guy, and would love a reason to support Linux besides the fact that it was not overseen by Bill Gates.
Thanks
Tom
I want to write code that works.
I want to use components that work.
I need the thrill of overcoming a few minor challenges. Not getting totally stopped because some technical writer has typos in his documentation and I pay $ and get insufficient technical support.
I'm not impressed with "X minutes of stable uptime" in an O/S. That needs to be at least "X weeks of stable uptime".
I'm glad to say that this is a hobby for me and my bread and butter comes from in-house Unix applications and I work in "an amusement park of cool programming tools". So although I wouldn't mind Bill's empire falling, that's not my real goal. If Win2000 can provide stability and they come out with minimal bugs (we can't expect much better from M$) in a Visual Studio 2000 or so; I'll gladly appropriate a copy. But I promise you, I will not pay for anymore M$ crap and be their unpaid Beta tester.
Also, M$ is still scared because JAVA gets the Unix/Linux crowd back in the game. So M$ is trying to make propriety extensions (against the intent of JAVA--maybe another law-suit). By the way, I compiled my first working socket program using samples at java.sun.com before Winsock and Inet disappointed me. Again for free!
If I try to get paid from my personal programming, it will most likely be web-based (in JAVA and its variants like JavaScript) and JoeBlow already knows how to use a browser. He won't care if I'm serving it through my Linux secure server.
Clunietp
Dec 16th, 1999, 01:24 PM
I guess we'll just have to wait and see what happens when Win 2K is released. I've never had a problem with my NT/SQL/IIS/MTS server, it just runs and runs.
Linux is probably not that much of a jump for you, since you already have a Unix background. I've attempted to learn unix via linux, but that ugly screen just turned me off. If it were not for Windows, I probably would not have gotten into computers at all, and if not for VB, I would be making my living some other way. I can't complain too much when I get an illegal operation -- Microsoft engineers are people too, and nobody is perfect, and I will not say that I can write better code than a Microsoft egghead. I can only really say thanks to MS for providing the tools and environment that allows a guy like me to write software and make a decent buck.
good luck on your new development platform, and I hope for your sake that the linux developers did not leave any feature undocumented or bug unfixed.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.