Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Location
    SC
    Posts
    936
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JS over the internet...

    Is it possible to recive and sent information to another pc using JS???

    thanks

  • #2
    New Coder
    Join Date
    Mar 2004
    Location
    UK
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Depends how you define "information". You could use js to send an e-mail, although as far as I'm aware this can't be done without user confirmation. You can also create cookies. However you can't use it to create files (without user interaction).

    What exactly did you have in mind?
    BRUCE

  • #3
    Regular Coder
    Join Date
    Oct 2003
    Location
    SC
    Posts
    936
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, let me specifie...

    I was thinking about a chess game, or maybe a chat... something like that

    thanks

  • #4
    New Coder
    Join Date
    Mar 2004
    Location
    UK
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've never tried anything related to either, but my guess would be that it would be difficult. I would have thought for chess that you would need to store move history information, so you would need to create a file storing that move information. You could, at the end of a user session, prompt the user whether he wanted to save a file, and then either get js to create the text for him to copy and paste, or (I believe, although I've never explored it) prompt him to save a created text file. That said, I think you'd be better served using a server-side programming language, so that the file could be created and stored on the server, in whatever format was required. In that way a saved game would be accessible to both players, or to anyone else (if you wanted it to be).

    I suppose a chat forum would be very similar to chess, in that you'd be wanting to have a "turn by turn" history, so the same would apply.
    BRUCE

  • #5
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    You'd be better off using a java applet or flash for this sort of thing. You can't do it with javascript, you will need some kind of serverside language

  • #6
    Regular Coder
    Join Date
    Oct 2003
    Location
    SC
    Posts
    936
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks


  •  

    Posting Permissions

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