Page 1 of 2 12 LastLast
Results 1 to 13 of 21

Thread: Keith Collins: Running program on internet

  1. #1
    Keith Collins
    Guest

    Keith Collins: Running program on internet

    I have an interactive program and I am wondering how I can make it available on the internet. I am new at this.

    First I downloaded Apache HTTP Server.

    Second, I developed the program. I tested it by putting an executable in the cgi-bin folder of Apache Server, using localhost (127.0.0.1). It seems to work OK. It uses JavaScript and the only browser I have is Internet Explorer.

    Third, I want to be able to run the program from a web host. I am assuming the host needs to be running Apache Server, but I don't know for sure and don't know where to look.

    The program allows a user to input a player hand of from 1 to 21 cards, the number of decks, dealer up card, dealer soft stand number, w/rules options for doubling, DAS, double any number of cards, surrender, ENHC. Output of program is basic strategy of either stand, hit, double, split, or surrender which is based on the hand composition/rules/decks.

    Any suggestions or comments appreciated.

    Sincerely,
    Keith Collins

  2. #2
    Keith Collins
    Guest

    Keith Collins: It seems to work

    > I have an interactive program and I am wondering how I
    > can make it available on the internet. I am new at
    > this.

    > First I downloaded Apache HTTP Server.

    > Second, I developed the program. I tested it by
    > putting an executable in the cgi-bin folder of Apache
    > Server, using localhost (127.0.0.1). It seems to work
    > OK. It uses JavaScript and the only browser I have is
    > Internet Explorer.

    > Third, I want to be able to run the program from a web
    > host. I am assuming the host needs to be running
    > Apache Server, but I don't know for sure and don't
    > know where to look.

    > The program allows a user to input a player hand of
    > from 1 to 21 cards, the number of decks, dealer up
    > card, dealer soft stand number, w/rules options for
    > doubling, DAS, double any number of cards, surrender,
    > ENHC. Output of program is basic strategy of either
    > stand, hit, double, split, or surrender which is based
    > on the hand composition/rules/decks.

    > Any suggestions or comments appreciated.

    > Sincerely,
    > Keith Collins

    I found a reasonably priced web host. I didn't know what problems to expect, but I finally managed to get my program to function which is mainly what I wanted to accomplish. So now I have my own site. I am learning as I go. I would be interested to know if my program functions in browsers other than Internet Explorer. I am in the process of getting an email address through the site so I can be informed of possible errors. www.bjstrat.net

    Keith Collins

  3. #3
    Magician
    Guest

    Magician: Firefox

    Congratulations on getting your site up and running.

    > I would be interested to know if my
    > program functions in browsers other than Internet
    > Explorer.

    I viewed your site with Firefox 1.0.7. Unfortunately none of the buttons (1-10, Undeal, Reset or Get Strategy) or any other controls on the page seemed to do anything. This may be because you have used language="JScript" in places instead of language="JavaScript". Or not. In the JavaScript console I got the error "frmStrat is undefined" on lines 433, 438, 443 and 448. Hope that helps.

    Also, on a few HTML pages you have used " instead of " (omitting the terminating semi-colon). IE renders " as ", but a standards-compliant browser will render it as &quot.

    If you want your site to work in other browsers, you might want to try some. Go on. They're free, they don't bite, and you might even decide to keep one.

  4. #4
    Keith Collins
    Guest

    Keith Collins: Re: Firefox

    > Congratulations on getting your site up and running.

    > I viewed your site with Firefox 1.0.7. Unfortunately
    > none of the buttons (1-10, Undeal, Reset or Get
    > Strategy) or any other controls on the page seemed to
    > do anything. This may be because you have used
    > language="JScript" in places instead of
    > language="JavaScript". Or not. In the
    > JavaScript console I got the error "frmStrat is
    > undefined" on lines 433, 438, 443 and 448. Hope
    > that helps.

    Thanks for the response.
    JScript is Microsoft's version of JavaScript. Since I was just learning and all I had at my disposal was MS Visual Studio 6 and its help files, I used it. I used JavaScript instead of VBScript because I thought it might have a chance to run in other browsers, but I guess not. At some points in their help files they referred to the language as "JScript" and in others as "javascript". I just stuck with their examples. It took me some time to get it to work on my development computer and even more time to get it to work over the internet, albeit in Internet Explorer. My web host started me on a Windows Server and when I followed their instructions, my cgi didn't work. I was switched to a Linux Server but it still didn't work. My cgi is compiled C++ and I found by research that I needed to compile the source on the Linux server to get it to work. They gave me shell access, but they had no C++ support on the Linux installation. I asked to be switched back to a Windows Server planning to possibly somehow switch from cgi to ASP. First though, I tried one more way to get my original cgi to work which was contrary to their instructions and it worked! It seems their cgi support is mainly geared toward the use of text files written in Perl. All in all it seems I still have a lot to learn. I had a brief glimpse of the non-Microsoft world, however, and I liked what I saw.

    > Also, on a few HTML pages you have used " instead
    > of " (omitting the terminating semi-colon). IE
    > renders " as ", but a standards-compliant
    > browser will render it as ".

    I'm not sure what you mean. Maybe you could give a specific example. I'm not great with HTML.

    > If you want your site to work in other browsers, you
    > might want to try some . Go on. They're free, they
    > don't bite, and you might even decide to keep one.

  5. #5
    Magician
    Guest

    Magician: Re: Firefox

    > Thanks for the response.
    > JScript is Microsoft's version of JavaScript. Since I
    > was just learning and all I had at my disposal was MS
    > Visual Studio 6 and its help files, I used it. I used
    > JavaScript instead of VBScript because I thought it
    > might have a chance to run in other browsers, but I
    > guess not. At some points in their help files they
    > referred to the language as "JScript" and in
    > others as "javascript".

    In typical Microsoft fashion, JScript is almost but not quite the same as JavaScript. However I think that any non-Microsoft broswer that sees language="JScript" is going to ignore the script. I think if you change this to language="JavaScript" it should still work in IE yet be more likely to work in other browsers.

    > I'm not sure what you mean. Maybe you could give a
    > specific example. I'm not great with HTML.

    Oops, that didn't come out how I typed it in the message box. Let me try it again:

    On a few HTML pages you have used &quot instead of " (omitting the terminating semi-colon). IE renders the former as ", but a standards-compliant browser will generally render it simply as &quot.

    For example, on your front page near the end of the "Why bjstrat?" paragraph, in Firefox I see:

    ...mitigate these &quotimpossible" streaks in blackjack.

    You need to add a semi-colon after &quot anytime you want a quotation mark.

    Try running your web pages through the Markup Validation Service. Valid HTML is more likely to render as you intended it in other browsers.

  6. #6
    Magician
    Guest

    Magician: Correction

    > ...mitigate these &quotimpossible" streaks in
    > blackjack.

    Should read:
    ...mitigate these &quotimpossible" streaks in blackjack.

    > You need to add a semi-colon after " anytime you
    > want a quotation mark.

    Should read:

    You need to add a semi-colon after &quot anytime you want a quotation mark.

  7. #7
    Magician
    Guest

    Magician: I give up

    You'll have to view your site or my post in Firefox to see what I'm talking about. :-)

  8. #8
    kc
    Guest

    kc: Re: I give up

    > You'll have to view your site or my post in Firefox to
    > see what I'm talking about. :-)

    I think I see what you mean. If I didn't include a terminating semi-colon, it is an error of ommission that I didn't mean to make. I'll check it out and make the repair.
    Thanks.
    Note: I am changing my posting handle to kc.

    Keith Collins

  9. #9
    kc
    Guest

    kc: Re: Firefox

    > In typical Microsoft fashion, JScript is almost but
    > not quite the same as JavaScript. However I think that
    > any non-Microsoft broswer that sees
    > language="JScript" is going to ignore the
    > script. I think if you change this to
    > language="JavaScript" it should still work
    > in IE yet be more likely to work in other browsers.

    Like I mentioned sometimes they referred to the language as "JScript" and sometimes "javascript". Maybe "javascript" is a more generic reference, I don't know. I didn't think the "JScript" would work in other browsers, but I was hoping. It would be nice if just referring to it as "javascript" would work in all browsers, but I don't know this to be true for a fact. I did a little research on JavaScript and found it is not a completely standardized language, so each browser may have its own interpretation. If it turns out that the syntax that I have used will work in all browsers, then getting it to work in all browsers could be doable, even if each references it differently. If this is the case, I would need to be able to identify an environmental variable that contained the name of the client browser. Then I could do something like
      
    if (environment variable == "IE")
    language="JScript"
    else if (environmental variable == "Firefox")
    language="Firefox's reference to JavaScript"
    else if (environmental variable == "Mozilla")
    etc.

    .
    If the syntax is different though, that would present much more of a problem.

    kc

  10. #10
    Magician
    Guest

    Magician: Re: I give up

    > I think I see what you mean. If I didn't include a
    > terminating semi-colon, it is an error of ommission
    > that I didn't mean to make. I'll check it out and make
    > the repair.
    > Thanks.
    > Note: I am changing my posting handle to kc.

    You must have figured it out because I see that the front page is now fixed. There are three more instances in the first paragraph of this page.

  11. #11
    Magician
    Guest

    Magician: Re: Firefox

    > Like I mentioned sometimes they referred to the
    > language as "JScript" and sometimes
    > "javascript". Maybe "javascript"
    > is a more generic reference, I don't know. I didn't
    > think the "JScript" would work in other
    > browsers, but I was hoping. It would be nice if just
    > referring to it as "javascript" would work
    > in all browsers, but I don't know this to be true for
    > a fact.

    Check out what the HTML 4.0 standard has to say about the SCRIPT tag. Basically, the best way to support multiple browsers is to use either language="Javascript" or leave out the language attribute altogether. Using language="JScript" is a pretty sure way to get non-MS browsers to ignore your script.

    Would you be willing to try changing the two instances in your page where you have language="JScript" to read language="Javascript" instead? This should have no effect on IE while improving the situation for other browsers.

    > if (environment variable == "IE")
    > language="JScript"
    > else if (environmental variable ==
    > "Firefox")
    > language="Firefox's reference to
    > JavaScript"
    > else if (environmental variable ==
    > "Mozilla")
    > etc.
    > .

    This is possible with Javascript but generally frowned upon.

  12. #12
    kc
    Guest

    kc: Thanks *NM*


  13. #13
    kc
    Guest

    kc: Re: Firefox

    > Check out what the HTML 4.0 standard has to say about
    > the SCRIPT tag . Basically, the best way to support
    > multiple browsers is to use either
    > language="Javascript" or leave out the
    > language attribute altogether. Using
    > language="JScript" is a pretty sure way to
    > get non-MS browsers to ignore your script.

    Actually I'm using xhtml www.w3.org/TR/xhtml1 . I think language="Javascript" (upper case J) and language="javascript" (lower case j) are equivalent but I think I read somewhere it's preferable to use lower case because case sensitivity is being phased into the standard. When "strict" is used in the header, it means the old case insensitive standard is to be used. When "transitional" is used, it means a newer standard is being used, but it still supports case insensitivity. Anyway, I'll give a shot to phasing out "JScript" and see what happens.

    > Would you be willing to try changing the two instances
    > in your page where you have
    > language="JScript" to read
    > language="Javascript" instead? This should
    > have no effect on IE while improving the situation for
    > other browsers.

    kc

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

About Blackjack: The Forum

BJTF is an advantage player site based on the principles of comity. That is, civil and considerate behavior for the mutual benefit of all involved. The goal of advantage play is the legal extraction of funds from gaming establishments by gaining a mathematic advantage and developing the skills required to use that advantage. To maximize our success, it is important to understand that we are all on the same side. Personal conflicts simply get in the way of our goals.