Popup Windows & VBScript - Possible?
-
Is it possible to open a popup window using ONLY VBScript? I _know_ it can be done with JavaScript, but can it be done with VBScript alone? NOTE: I don't mean a MsgBox, I mean a proper browser window.
-
Is it possible to open a popup window using ONLY VBScript? I _know_ it can be done with JavaScript, but can it be done with VBScript alone? NOTE: I don't mean a MsgBox, I mean a proper browser window.
-
Er... because that uses JavaScript, when I specifically said only VBScript?
-
Er... because that uses JavaScript, when I specifically said only VBScript?
I'm currently working for a client that requested all server and client side code for their intranet site be done with vbscript. While that isn't really important to you, I can say that most examples you see of client side code are done in javascript but the syntax is usually almost identical in vbscript barring the language differences like variable declarations, curly braces and line terminators, if you play around a bit I'm sure you can get a pure vbscript window.open to work just fine. In fact, I'll make it really easy for you, took the javascript code from the dhtml reference in the message above, took off the line ending ";" and removed the parentheses because you get an error about calling a subroutine with parentheses. It's usually about that easy to translate javascript to vbscript because the object model is the same for dhtml you just have to eliminate the language differences. Sub button1_onclick window.open "layout.htm",null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no" End Sub Good Luck! Jon
-
I'm currently working for a client that requested all server and client side code for their intranet site be done with vbscript. While that isn't really important to you, I can say that most examples you see of client side code are done in javascript but the syntax is usually almost identical in vbscript barring the language differences like variable declarations, curly braces and line terminators, if you play around a bit I'm sure you can get a pure vbscript window.open to work just fine. In fact, I'll make it really easy for you, took the javascript code from the dhtml reference in the message above, took off the line ending ";" and removed the parentheses because you get an error about calling a subroutine with parentheses. It's usually about that easy to translate javascript to vbscript because the object model is the same for dhtml you just have to eliminate the language differences. Sub button1_onclick window.open "layout.htm",null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no" End Sub Good Luck! Jon
Wow, I owe you an apology. I originally thought you had misunderstood my intentions... especially when that article had the example in JS {:v) And knock me down with a feather, it works... I'm impressed. I'm just baffled as to why it is so hard to find information on it when I look {:v( So thankyou.
-
Wow, I owe you an apology. I originally thought you had misunderstood my intentions... especially when that article had the example in JS {:v) And knock me down with a feather, it works... I'm impressed. I'm just baffled as to why it is so hard to find information on it when I look {:v( So thankyou.
Actually, I owe Andy an apology, since he was the original replyee and not yourself {:v) Oh, it's been a funny day.
-
Actually, I owe Andy an apology, since he was the original replyee and not yourself {:v) Oh, it's been a funny day.
I agree with you, it's very hard to find any decent info in regards to using vbscript on the client side. It most definetly relates to cross-browser issues. When dealing with intranet's there is a legitimate argument to be made for using vbscript on both the client and server and not mixing languages when you're sure that everyone is using IE. Hopefully you can see that the translation is pretty easy. I haven't found any javascript yet that couldn't be reworked into vbscript with a little bit of effort. Good luck, Jon
-
I agree with you, it's very hard to find any decent info in regards to using vbscript on the client side. It most definetly relates to cross-browser issues. When dealing with intranet's there is a legitimate argument to be made for using vbscript on both the client and server and not mixing languages when you're sure that everyone is using IE. Hopefully you can see that the translation is pretty easy. I haven't found any javascript yet that couldn't be reworked into vbscript with a little bit of effort. Good luck, Jon
Thankyou, that's a very interesting discovery. I have to admit I don't intend to use VBScript client side because of the Netscape issue, but in this instance I wanted to use it to demonstrate a variety of Web programming 'languages', including both scripts, ActiveX, Java, DHTML (JS), etc.
-
Er... because that uses JavaScript, when I specifically said only VBScript?
-
Have fun!     Sub Yar         window.open "crap.htm"     End Sub Andy Gaskell, MCSD
Thanks to Jon, I have now realised that this also works in VBS... that article being in JS threw me for a loop. There's an apology (to you) somewhere above this line, even though I mistakenly aimed it at Jon {:v)