6 Replies - 930 Views - Last Post: 14 June 2012 - 10:42 PM

#1 Nolan_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 13-June 12

HTML5 Mobile App - Coms between separate users?

Posted 13 June 2012 - 08:23 PM

I am trying to build an html5 site for mobile devices that does something like this:

1) User logs in
2) User presses a button on a page that starts a timer (15 secs)
3) During the 15 second countdown, if ANY OTHER USER logs in and presses the button (starting THEIR 15 second timer) BOTH users get a message asking them to do something (like press another button).

Using Windows 2008 R2.

Is this easy?
Thanks in advance.
Nolan

Is This A Good Question/Topic? 0
  • +

Replies To: HTML5 Mobile App - Coms between separate users?

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 4136
  • View blog
  • Posts: 13,051
  • Joined: 08-June 10

Re: HTML5 Mobile App - Coms between separate users?

Posted 13 June 2012 - 10:42 PM

looks easy enough with Javascript (which is, coincidentally, independent from every other user because it runs in the browser/client).
Was This Post Helpful? 0
  • +
  • -

#3 Nolan_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 13-June 12

Re: HTML5 Mobile App - Coms between separate users?

Posted 14 June 2012 - 10:43 AM

Not sure how client-side Javascript is going to tell me that another user on the server has clicked a button. I'm pretty sure there will be some server-side code needed as well.
I'm thinking something along the lines of a timed session variable? JSON?

I guess my question shouldn't have been "Is this easy?", but more like "Can someone please offer me some pointers on how to get started?"
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 4136
  • View blog
  • Posts: 13,051
  • Joined: 08-June 10

Re: HTML5 Mobile App - Coms between separate users?

Posted 14 June 2012 - 11:05 AM

View PostNolan_, on 14 June 2012 - 07:43 PM, said:

Not sure how client-side Javascript is going to tell me that another user on the server has clicked a button.

of course not. because there are no buttons on the server.

I think websockets might be a way to go.
Was This Post Helpful? 0
  • +
  • -

#5 Nolan_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 13-June 12

Re: HTML5 Mobile App - Coms between separate users?

Posted 14 June 2012 - 02:35 PM

Dormlich - You're not helping.

Anyone else want to ad a comment?
Thanks.
Was This Post Helpful? 0
  • +
  • -

#6 Smarty57  Icon User is offline

  • D.I.C Regular

Reputation: 1
  • View blog
  • Posts: 333
  • Joined: 22-May 12

Re: HTML5 Mobile App - Coms between separate users?

Posted 14 June 2012 - 08:09 PM

You could perhaps have a time stamp of when they clicked the button, and if it's 15 secs away from someone then it does what you want it to do. I am not too familiar with web development besides some html. So, this is just a suggestion of a method that could be used.

This post has been edited by Smarty57: 14 June 2012 - 08:10 PM

Was This Post Helpful? 0
  • +
  • -

#7 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 4136
  • View blog
  • Posts: 13,051
  • Joined: 08-June 10

Re: HTML5 Mobile App - Coms between separate users?

Posted 14 June 2012 - 10:42 PM

View PostNolan_, on 14 June 2012 - 11:35 PM, said:

Dormlich - You're not helping.

I am sorry that I do not have proficient knowledge in Websockets, so that I can write such an application for you. Considering that Chat applications are written using Websockets (e.g. node.js + socket.io), it seems that they should be able to do what you want.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1