mobile_fu rendering over AJAX so it seems

mobile_fu rendering over AJAX so it seems

My controller renders regular html, mobile_fu, and javascript as such:

respond_to do |format|   format.html {     render :action => "full", :layout => "application" and return   } {     render :action => "full", :layout => "application" and return   }   format.js {     render :partial => "content", :layout => false and return   } end 

Regular html renders fine, using AJAX from the html version of the site works fine, but using AJAX on the mobile browser seems to always render the block. I'm using jQuery when binding it to the click event of a button, and my testing on the iPhone always ends up rendering the block above..

$.ajax({           beforeSend      : function(request) { request.setRequestHeader("Accept", "text/javascript"); },           success         : function(response) {             $("#content").append(response);           },           type            : 'GET',           url             : url, //set somewhere else           data            : data //set somewhere else       }); 

Is jQuery not catching the click event (iPhone quirk?) or is mobile_fu taking charge and being a little overbearing here? Anyone already tackled this or see what I'm missing?

What is the best way to download image data from ASP.NET to iphone?


Performance problems on iPhone using simple graphics
Looking at the code for mobile_fu shows that any mobile request coming in will be set to mobile.

Converting OpenGL Primitives to OpenGLES
Changing line 73 to something like this might work:.
if is_mobile_device? && !request.xhr? 

casting a NSString to char problem

Trying to include iPhone OpenGLES headers in C++ code


Is NSTimer auto retained?
Just in case someone else finds this, if you have different javascript for mobile devices, you can do:.
Submit ajax form on keyboard close without a submit button on the iphone? {render :content_type => "application/javascript"} 
(put your js in

50 out of 100 based on 25 user ratings 700 reviews