Reverse Ajax on iPod touch/iPhone

View: New views
2 Messages — Rating Filter:   Alert me  

Reverse Ajax on iPod touch/iPhone

by Yuuichi Teranishi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I bought iPod touch last week and confirmed DWR runs on Safari/iPod touch!
I don't have iPhone but maybe it works on iPhone too.

The only problem was I needed following modification on engine.js for Reverse Ajax.
(I don't know it is right solution or not but it works)

Thanks,

--- engine.js.orig Tue Oct  9 22:53:29 2007
+++ engine.js Tue Oct  9 22:57:04 2007
@@ -559,7 +559,8 @@
   if (dwr.engine._pollReq) {
     var req = dwr.engine._pollReq;
     var text = req.responseText;
-    dwr.engine._processCometResponse(text, req.batch);
+    if (text != null)
+        dwr.engine._processCometResponse(text, req.batch);
   }
 
   // If the poll resources are still there, come back again

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Reverse Ajax on iPod touch/iPhone

by Joe Walker-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Excellent - thanks.
I'll add that.

Joe.

On 10/9/07, Yuuichi Teranishi <teranisi@... > wrote:
Hi,

I bought iPod touch last week and confirmed DWR runs on Safari/iPod touch!
I don't have iPhone but maybe it works on iPhone too.

The only problem was I needed following modification on engine.js for Reverse Ajax.
(I don't know it is right solution or not but it works)

Thanks,

--- engine.js.orig      Tue Oct  9 22:53:29 2007
+++ engine.js   Tue Oct  9 22:57:04 2007
@@ -559,7 +559,8 @@
   if (dwr.engine._pollReq) {
     var req = dwr.engine._pollReq;
     var text = req.responseText;
-    dwr.engine._processCometResponse(text, req.batch);
+    if (text != null)
+        dwr.engine._processCometResponse(text, req.batch);
   }

   // If the poll resources are still there, come back again

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...