Javascript Chat Client

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • risk32
    New Member
    • Mar 2008
    • 98

    Javascript Chat Client

    Hello All. As I am pretty sure this question has ALREADY been posted, I have a, well, more restricted concept.

    Is it at all possible to create a chat client strictly from html and JS (plus CSS for style formatting and basic setup)? The frames I have created using HTML look rather bland and dont really have the style I want. Which is why JS and CSS come into play...

    I do not have any server apllications or software for that matter available to me, frankly because I dont have access rights to the server or to be able to install anything on the workstation I am currently using. This is where the restriction lies... I do have access, however, to everything I need on my homestation but I need to directly upload everything I work on at my workstation. Limited is an understatement at the least.

    I haven't started so much, as I'm just looking for suggestions on what kind of style is recommended, and what features are more commonly used for the general public. Any suggestions or links to tutorials on this matter would be GREATLY appreciated. I have been looking at some tutorials and I found something that will work at what I'm trying to do, but it's in PHP and MySQL (two things not allowed on the network) Ugh... I'm stuck with Notepad and Microsoft Office.

    Anyways, thanks for taking the time to read this, even if I dont get any replies.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    I'm afraid JavaScript won't help here. You need server-side code.

    Comment

    • iam_clint
      Recognized Expert Top Contributor
      • Jul 2006
      • 1207

      #3
      Since I've never seen javascript listen on ports (act as a server) I'm afraid you cannot do this without a server side language as well as the javascript

      client -> server -> client

      if javascript could act as a server it would just be

      client -> client


      client = javascript in this scenario

      Comment

      • risk32
        New Member
        • Mar 2008
        • 98

        #4
        Do you have a good suggestion on what to use as server-side languages? Possibly AJAX or something like that?

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Ajax is not a server-side language. It's the name given to a group of already existing technologies/languages which provide the ability to call and receive from the server-side without reloading/refreshing/unloading the page.

          You mention that PHP is not allowed, so the server-side language you use will depend on what's available for you.

          Comment

          • risk32
            New Member
            • Mar 2008
            • 98

            #6
            Could JSSP be used?

            Might not make too much sense, but is there a way to create a virtual server (like a VPN within a router) on a localhost? More or less, setup up a client as a server without all the programs needing to be loaded.

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              I'm not sure what you mean by without all the programs needed to be loaded, but yes you can use localhost as a server, but then you'd need to accept requests from clients otherwise there's not much point in chatting to oneself.

              By JSSP, did you mean JSP?

              Comment

              • risk32
                New Member
                • Mar 2008
                • 98

                #8
                Originally posted by acoder
                I'm not sure what you mean by without all the programs needed to be loaded, but yes you can use localhost as a server, but then you'd need to accept requests from clients otherwise there's not much point in chatting to oneself.

                By JSSP, did you mean JSP?
                JSSP = Java Script Server Page (think thats the acronym)

                Comment

                • acoder
                  Recognized Expert MVP
                  • Nov 2006
                  • 16032

                  #9
                  It would still require a server that can execute Java servlets.

                  Comment

                  • gits
                    Recognized Expert Moderator Expert
                    • May 2007
                    • 5390

                    #10
                    Originally posted by risk32
                    JSSP = Java Script Server Page (think thats the acronym)
                    I've never heard of that ... i think you indeed mean Java Server Pages = JSP which is completely different from JavaScript. for real JavaScript-serverside code execution you would need special plugins/enhancements of the webserver like mod_js or a JavaScript-enabled Application Server like Jaxer or something like this.

                    kind regards

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      I think risk32 was referring to JSSP - JavaScript Server Pages. It requires a Java server, e.g. Tomcat.

                      Comment

                      • rnd me
                        Recognized Expert Contributor
                        • Jun 2007
                        • 427

                        #12
                        if you have an http server (not necessarily a scripting server like asp or php), you can save files using ajax without any server scripts.

                        using a bouncing script tag, you would simply load the file every couple seconds.

                        it displays the text, then rewrites the file with new text, or blanks it, whatever.

                        i have made this before without any server-side scripts.

                        i would be more than happy to post my app if you can use it.



                        do you access the page from a file:// , or a http:// URL?

                        Comment

                        • gits
                          Recognized Expert Moderator Expert
                          • May 2007
                          • 5390

                          #13
                          Originally posted by acoder
                          I think risk32 was referring to JSSP - JavaScript Server Pages. It requires a Java server, e.g. Tomcat.
                          hmmm ... as i said i've never heard of it before ;) ... now i know it. it seems to be just one more serverside JavaScript supporting Webserver-(AppContainer)-module to allow serverside JS-code-execution ... and it's interesting to know that the number of such things still increases ... but i guess that this is not a real advantage over settled techniques ... except for small applications with small amounts of data where no performance-critical tasks are to be expected ... JavaScript has too much drawbacks when it comes to serverside code ... of course it is quite capable for a lot of things but at least when you need high-performance processing, image-processing-capabilities etc. it is not enough and you need another language too ... so this would break the technical layers a bit by mixing up different techniques for one 'logical' layer and in bigger projects this is just a pain to maintain ... at least it could be ;)

                          just my 2 cents about this topic ;)

                          kind regards,
                          gits

                          Comment

                          • risk32
                            New Member
                            • Mar 2008
                            • 98

                            #14
                            Originally posted by rnd me
                            if you have an http server (not necessarily a scripting server like asp or php), you can save files using ajax without any server scripts.

                            using a bouncing script tag, you would simply load the file every couple seconds.

                            it displays the text, then rewrites the file with new text, or blanks it, whatever.

                            i have made this before without any server-side scripts.

                            i would be more than happy to post my app if you can use it.



                            do you access the page from a file:// , or a http:// URL?
                            All of our sites (well I should say site) is run from a local server not available through http://, therefor being run from file:// (also makes it a pain to write code because of the darn Shell() command in VB even though I've been able to manage).

                            The server we have is VERY strict. Welcome to the government...
                            The only "software", and I use this term VERY VERY loosely, is Notepad and IE. I've been asking for months for new software but it hasn't happened and probably never will. Some days I wish I was still civilian.

                            As far as having an http server, thats most likely a no. Everything is intranet.

                            Comment

                            • Tarantulus
                              New Member
                              • May 2007
                              • 114

                              #15
                              Originally posted by risk32
                              As far as having an http server, thats most likely a no. Everything is intranet.
                              I hate to say you are out of luck sir, it would be very easy to do what you want if you could write to a file or database, but javascript cannot do these things

                              Comment

                              Working...