function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jthor@entransform.comjthor@entransform.com 

Javascript remoting and iPhone

Hi,

   

    I seem to have a problem. I have a piece of code that does a little javascript remoting that wokrs fine in android, but doe not in iphone. 

function fbLogin() {
           /**mobileController2.getTheAppId(
           function(result, event){
           	if(event.status){
           		alert(result);
           		var permissions = 'email,publish_stream,manage_pages,read_stream';
           		var url = document.URL;
				var permissionUrl = "https://m.facebook.com/dialog/oauth?client_id=" + result + "&response_type=code&redirect_uri=" + encodeURIComponent('url') + "&scope=" + permissions;				
				window.location = permissionUrl;
           	}else if(event.type === 'exception'){
           		alert("Failed to login. Please log in again");
           		location.reload()
           	}else{
           		alert("An unknown error has occurred");
				location.reload();
           	}
           });

 I'm wondering what's wrong? Is it a security issue where we can't open up a new window in the javascript remote? Or is it becuase iphone does not let us do? 

jthor@entransform.comjthor@entransform.com

Opp nvm the thread. It was just a syntax error.

jthor@entransform.comjthor@entransform.com

The syntax error wasn;t cuase. I still can't go to a different page inside the javascript remoting, but if I do it outside of the remotng it works fine.

jthor@entransform.comjthor@entransform.com

After a few more dubbing I found out that the error is that type error: undefine is not a function (evaluating mobileController2.getTheAppId).

 

So I did some more research and it turn out that it becuase the function does not exist. So I was wondering then why deos it work on Chrome but not on safari?