When a user opens my homepage, I want them automatically redirected to another page. How can I do this in VBScript?
Printable View
When a user opens my homepage, I want them automatically redirected to another page. How can I do this in VBScript?
You can do something like this:
Code:<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
Sub window_onload
window.open "http://www.microsoft.com"
End Sub
</SCRIPT>
</HEAD>
<BODY>
<P> </P>
</BODY>
</HTML>
or if you don't want to open a new window try:
Code:<html>
<script language=javascript>
location.href = "http//www.someotherplace.com/"
</script>
</html>
Thanks for your replies, but I isn't what I wanted. I want to use VBScript, but I don't want to open a new window. Or maybe there's another way: I'm executing some VBScript and then I want to open the other page.
ok, vbscript then:
Code:<html>
<script language="vbscript">
location.href="http://www.microsoft.com/"
</script>
</html>