It may be one of the daftest questions... - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

It may be one of the daftest questions...

SkavenSkaven Posts: 8Member
Can you put a BASIC script into a web page???

~~ Skaven ~~
«1

Comments

  • KDivad LeahcimKDivad Leahcim Posts: 3,948Member
    : Can you put a BASIC script into a web page???
    :
    : ~~ Skaven ~~
    :

    No. vbScript is the closest you'll get.
  • SkavenSkaven Posts: 8Member
    : : Can you put a BASIC script into a web page???
    : :
    : : ~~ Skaven ~~
    : :
    :
    : No. vbScript is the closest you'll get.
    :
    Yeah, I thought that would be the case.

    ~~ Skaven ~~
  • delmandelman Posts: 4Member
    : : : Can you put a BASIC script into a web page???
    : : :
    : : : ~~ Skaven ~~
    : : :
    : :
    : : No. vbScript is the closest you'll get.
    : :
    : Yeah, I thought that would be the case.
    :
    : ~~ Skaven ~~
    :

    Actually, yes, you can use compiled .exe QB programs as CGI and I have done it before. Like any other CGI language, QB uses stdout so you can just PRINT your html data.

    The problem is that unfortunately most commercial servers don't support 16-bit DOS applications for CGI (actually, most don't support any .exe programs). And most ISP's will probably laugh at you if you ask!

    However, if you're talking about using your own server it shouldn't be a problem. I used Xitami (free compact server software, see www.xitami.com) and it worked fine. Otherwise, there is some 16-bit CGI gateways available if you already have a different server set up.

    If you want some source code to see how its done once you have the server set up (eg. read in form data, etc), I'll post it - it's surprisingly very simple to do.
  • KDivad LeahcimKDivad Leahcim Posts: 3,948Member
    : : : : Can you put a BASIC script into a web page???
    : : : :
    : : : : ~~ Skaven ~~
    : : : :
    : : :
    : : : No. vbScript is the closest you'll get.
    : : :
    : : Yeah, I thought that would be the case.
    : :
    : : ~~ Skaven ~~
    : :
    :
    : Actually, yes, you can use compiled .exe QB programs as CGI and I have done it before. Like any other CGI language, QB uses stdout so you can just PRINT your html data.
    :
    : The problem is that unfortunately most commercial servers don't support 16-bit DOS applications for CGI (actually, most don't support any .exe programs). And most ISP's will probably laugh at you if you ask!
    :
    : However, if you're talking about using your own server it shouldn't be a problem. I used Xitami (free compact server software, see www.xitami.com) and it worked fine. Otherwise, there is some 16-bit CGI gateways available if you already have a different server set up.
    :
    : If you want some source code to see how its done once you have the server set up (eg. read in form data, etc), I'll post it - it's surprisingly very simple to do.
    :

    Except for one little detail:

    Yes, QB can be used to output HTML (at least, I'm assuming you are right), but the question wanted it embedded in the page itself like vbScript of JavaScript can be. In that case, no, it can't be done.
  • delmandelman Posts: 4Member
    : : : : : Can you put a BASIC script into a web page???
    : : : : :
    : : : : : ~~ Skaven ~~
    : : : : :
    : : : :
    : : : : No. vbScript is the closest you'll get.
    : : : :
    : : : Yeah, I thought that would be the case.
    : : :
    : : : ~~ Skaven ~~
    : : :
    : :
    : : Actually, yes, you can use compiled .exe QB programs as CGI and I have done it before. Like any other CGI language, QB uses stdout so you can just PRINT your html data.
    : :
    : : The problem is that unfortunately most commercial servers don't support 16-bit DOS applications for CGI (actually, most don't support any .exe programs). And most ISP's will probably laugh at you if you ask!
    : :
    : : However, if you're talking about using your own server it shouldn't be a problem. I used Xitami (free compact server software, see www.xitami.com) and it worked fine. Otherwise, there is some 16-bit CGI gateways available if you already have a different server set up.
    : :
    : : If you want some source code to see how its done once you have the server set up (eg. read in form data, etc), I'll post it - it's surprisingly very simple to do.
    : :
    :
    : Except for one little detail:
    :
    : Yes, QB can be used to output HTML (at least, I'm assuming you are right), but the question wanted it embedded in the page itself like vbScript of JavaScript can be. In that case, no, it can't be done.
    :

    Yeah you're right, you can't write QB "scripts" in the sense that a script is an uncompiled program. I guess I misread the question!
  • KDivad LeahcimKDivad Leahcim Posts: 3,948Member
    : Yeah you're right, you can't write QB "scripts" in the sense that a script is an uncompiled program. I guess I misread the question!
    :

    Then again, if you don't mind modifying input and file i/o routines, you would almost have vbScript from QB. Although vbScript is based on VB, VB is backwards compatible with most of QB, so they are all very similar.

    I guess in summary:

    Learn vbScript and use it.
    -or-
    Get your host to support 16bit DOS apps and use your QB exe for CGI. (Interesting idea that I hadn't thought of!)
  • SkavenSkaven Posts: 8Member
    Thanks for you help. I normally use JavaScript or Python on my webpages because I have a good understanding of those languages. I also have a good understanding of GW BASIC and QBasic, that's why i asked.

    And as I said... Thanks!!!


  • Alex_EldersonAlex_Elderson Posts: 104Member
    one nice thing there is a web-side script called netbasic (from Novell).

    it's like qbasic

    : Thanks for you help. I normally use JavaScript or Python on my webpages because I have a good understanding of those languages. I also have a good understanding of GW BASIC and QBasic, that's why i asked.
    :
    : And as I said... Thanks!!!
    :
    :
    :

  • KDivad LeahcimKDivad Leahcim Posts: 3,948Member
    : one nice thing there is a web-side script called netbasic (from Novell).
    :
    : it's like qbasic
    :

    Just out of curiousity, why not just use vbScript? Support is probably much wider and it's also still basic.
  • VB5begginnerVB5begginner Posts: 66Member
    umm...vbscript pretty much is QBasic...its definately not "Visual"...as in where the V bart of the VBScript name came from...and almost every thing in Visual Basic came from QBasic...they're identical languages...just with a little improvement...but its the same thing... BASIC...

    But...if you really wanted to, you could compile youre own BASIC script reader and embed it into IE yourself...of course visitors will need to download your components, but it can be done...if youre really interested then check out this link...
    http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/pluggable/overview/overview.asp

    but as i and others have said....it'd be easy enough just to use vbscript

    [hr]


    : : one nice thing there is a web-side script called netbasic (from Novell).
    : :
    : : it's like qbasic
    : :
    :
    : Just out of curiousity, why not just use vbScript? Support is probably much wider and it's also still basic.
    :

«1
Sign In or Register to comment.