View Full Version : JS over the internet...
06-05-2004, 09:21 PM
Is it possible to recive and sent information to another pc using JS???
06-05-2004, 09:31 PM
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?
06-05-2004, 09:40 PM
Sorry, let me specifie...
I was thinking about a chess game, or maybe a chat... something like that
06-05-2004, 09:57 PM
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.
06-05-2004, 10:05 PM
06-05-2004, 11:49 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.