Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Popup Windows & VBScript - Possible?

Popup Windows & VBScript - Possible?

Scheduled Pinned Locked Moved Web Development
javascriptquestion
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jason Teagle
    wrote on last edited by
    #1

    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.

    A 1 Reply Last reply
    0
    • J Jason Teagle

      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.

      A Offline
      A Offline
      AndyG
      wrote on last edited by
      #2

      http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp

      J 1 Reply Last reply
      0
      • A AndyG

        http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp

        J Offline
        J Offline
        Jason Teagle
        wrote on last edited by
        #3

        Er... because that uses JavaScript, when I specifically said only VBScript?

        J A 2 Replies Last reply
        0
        • J Jason Teagle

          Er... because that uses JavaScript, when I specifically said only VBScript?

          J Offline
          J Offline
          Jon Gohr
          wrote on last edited by
          #4

          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

          J 1 Reply Last reply
          0
          • J Jon Gohr

            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

            J Offline
            J Offline
            Jason Teagle
            wrote on last edited by
            #5

            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.

            J 1 Reply Last reply
            0
            • J Jason Teagle

              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.

              J Offline
              J Offline
              Jason Teagle
              wrote on last edited by
              #6

              Actually, I owe Andy an apology, since he was the original replyee and not yourself {:v) Oh, it's been a funny day.

              J 1 Reply Last reply
              0
              • J Jason Teagle

                Actually, I owe Andy an apology, since he was the original replyee and not yourself {:v) Oh, it's been a funny day.

                J Offline
                J Offline
                Jon Gohr
                wrote on last edited by
                #7

                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

                J 1 Reply Last reply
                0
                • J Jon Gohr

                  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

                  J Offline
                  J Offline
                  Jason Teagle
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  • J Jason Teagle

                    Er... because that uses JavaScript, when I specifically said only VBScript?

                    A Offline
                    A Offline
                    AndyG
                    wrote on last edited by
                    #9

                    Have fun! &nbsp&nbsp&nbsp&nbspSub Yar &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwindow.open "crap.htm" &nbsp&nbsp&nbsp&nbspEnd Sub Andy Gaskell, MCSD

                    J 1 Reply Last reply
                    0
                    • A AndyG

                      Have fun! &nbsp&nbsp&nbsp&nbspSub Yar &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspwindow.open "crap.htm" &nbsp&nbsp&nbsp&nbspEnd Sub Andy Gaskell, MCSD

                      J Offline
                      J Offline
                      Jason Teagle
                      wrote on last edited by
                      #10

                      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)

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups