Running VB code on WebPages

Discussion in 'Web Design & Coding' started by Lukas, May 20, 2002.

  1. Lukas

    Lukas Real Name No Gimmicks

    Messages:
    421
    Hi guys,

    A little off topic here, but really need your help.

    I was wondering if it's possible to run VB Code on Webpages.
    I have an access application I would like to run in a web browser. Basically the application is nothing but a bunch of buttons that open telnet sessions to designated ip adresses.

    Code in access looks like this:

    Private Sub TelnetUCB_click()
    Call Shell ("telnet 193.xx.xxx.xx", 1)
    End Sub


    Is there A way to implement this into a webpage?



    Thnx in advance,


    Lukas
     
  2. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    You should take a look at .ASP i think. The code in ASP is VB, but the pages will have to be run on a webserver* (not a problem but important to know).

    *Meaning you can't use "file:///c:/folder/whatever.asp" to run it.
     
  3. Lukas

    Lukas Real Name No Gimmicks

    Messages:
    421
    Damn

    Zedric, thnx for reply...

    The meaning of all this is that I'm collecting all of our information and tools at work, converting everything to html/php and getting it on a intranet server.

    The only problem is that I don't know s*** of ASP...



    Getting ready to google now, but if anyone knows how to build such a page in asp, please let me know...


    Greetz

    Lukas
     
  4. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Since you mension PHP I assume you know that language. ASP is almost exactly the same thing, only the code is VBScript instead of PHP code and the tags are <% %> instead of <? ?>. I'm sure Microsoft has alot of information and tutorials on ASP.
     
  5. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    Yes, you are able to run and call VBSCRIPT from HTML.

    <SCRIPT LANGUAGE="VBSCRIPT">
    <!--
    CODE HERE
    -->
    </SCRIPT>

    Enjoy.
     
  6. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    and yes, as Zedric mentioned. <% and %>

    If you know PHP, ASP, Perl, and other languages are VERY easy to learn.

    To call a VBSCRIPT from an A HREF use the onClick=""
     
  7. Lukas

    Lukas Real Name No Gimmicks

    Messages:
    421
    Errr...

    Thnx for the answers, but there is a slight misunderstanding.

    I know HTML but I don't know PHP. I mean, I can install it, configure PHP nuke, and edit a little code. But I don't know how to write a whole application in PHP... (that's yet to come)

    Now that's that cleared up, my code would be like this:


    <%
    <SCRIPT LANGUAGE="VBSCRIPT">
    <a href="blabla" onclick="Call Shell ("telnet 193.xx.xxx.xx", 1)"
    </SCRIPT>
    %>

    or not?


    I would really like to thank you guys for trying to help me out...



    Greetz

    Lukas
     
  8. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    No not really. The <% code %> is for ASP, which is run on the server side and therefor browser independant. The <SCRIPT></SCRIPT> is just like javascript but VBScript code instead. This code is run in the browser (client side) and is therefor browser dependant. In this case that means Internet Explorer only. This is also the way most email viruses are made, so many people may have turned VBScript off in order to secure themselfs. I'd go with ASP. It's very easy if you know VB allready.

    Example
    -----------
    page1.asp:
    Code:
    <A HREF="page2.asp">Click Here!</A>
    page2.asp
    Code:
    <%
    Call Shell ("telnet 193.xx.xxx.xx", 1)
    %>
    Or something like it.