Hi All,
I am struggling to proceed further with my project now. I am using express3
and socket.io and my index pages is working with no issue to get and send
data between client and server.
Through my index page I am sending username to server,
*socket.emit("checkin",{'USER_NAME': user});*
and once server validate, it sets loggedin to true,
* sessionStore.loggedIn = true;*
And try to load another page,
*action="./process.html"*
In process.html onload,
*window.onload = function() {*
* socket.emit("checklogin", "test");*
* socket.on*
* (*
* "returnlogin",function(data) {*
* window.alert("Is user valid?"+data);*
* }*
*);*
*}*
Where in server,
*socket.on('checklogin', function (data) {*
* if(sessionStore.loggedIn) {*
* socket.emit("returnlogin", 'VALID');*
* }*
* else {*
* socket.emit("returnlogin", 'INVALID');*
* }*
* });*
In console log I can see that user is invalid but " window.alert("Is user
valid?"+data);" in above code is not responding. I am sure that
window.alert work in my browser but I am not sure why client is not
lunching alert even after receiving response from server.
Looking for suggestion from experienced people.
Thanks
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.