Problems:
1. Test Environment
Neither Firefox nor Chrome can call back the checkSIGNIN_callback method.
Diagnosis: Listening to port 89 on the server, Data Request arrival, normal return of JSON format data
Solution: Debug using Ripple of IM
2. Test on the BlackBerry real machine. The code does not successfully perform network access.
Diagnosis: Listening to port 89 on the server finds that no data request arrives or data is returned.
Possible problem: a) access controll B in the config. xml file) access to special port 89 on the carrier (China Unicom) Network
Solution: Modify the port or port ing on the server, change port 89 to port 80, and change port 89 to port 80 in the program.
(To ensure that the original exlive Server user can log on normally, I mapped 89 to two external ports 80 and 89 on the vro)
Code snippet:
[Javascript]
Function checkSIGNIN_callback (data ){
[Javascript] view plaincopy
<Span style = "white-space: pre"> </span> if (data. signInTime = "") {// not sign in
$ ("# Signin_button"). text ("sign in ");
$ ('# Signin_button'). button ('refresh ');
} If (data. signOutTime = "") {// not sign out
$ ("# Signin_button"). text ("check out ");
$ ('# Signin_button'). button ('refresh ');
} Else {
$ ("# Signin_button"). text ("sign-in/check-out ");
$ ('# Signin_button'). button ('refresh ');
}
Alert (6 );
}
Function checkSIGNIN (){
Alert ("gPhone is" + gPhone );
JQuery. support. cors = true;
CheckSIGNIN_url = "http://shanghai.springworks.info: 89/pgps/empPr/empParamAction_sendEmpParam.action? Phone = "+ gPhone;
$. GetJSON (checkSIGNIN_url, checkSIGNIN_callback );
}