Mobile - Redirect to External URL is giving error 400

Mobile - Redirect to External URL is giving error 400

  

Hi,

I am developing a personal mobile app where I wanted to redirect to external URL from a link.

I have used javascript code to redirect but its giving error as described below:

Code:

window.open("http://www.google.com", "_blank");


Error: 

{"Errors":["The 'Name' HTTP Header is missing in the request."],"StatusCode":400}


Can anyone explain me what I am doing wrong?

Regards,
Palak Patel

Solution

Palak Patel wrote:

Hi,

I am developing a personal mobile app where I wanted to redirect to external URL from a link.

I have used javascript code to redirect but its giving error as described below:

Code:

window.open("http://www.google.com", "_blank");


Error: 

{"Errors":["The 'Name' HTTP Header is missing in the request."],"StatusCode":400}


Can anyone explain me what I am doing wrong?

Regards,
Palak Patel

Hi Palak,


Try with InAppBrowser plugin


Solution

Hi Palak,


How did you implement the redirect logic?

I tried your code snipet on a simple "icon click > client action with the js code", on my ToDo application, and I had no problems.

Besides, I'm not using the InAppBrowser plugin.


Best regards,

Davide Résio

Hi,

I am able to solve the issue using InAppBrowser plugin.

Actually I was redirecting to a location which is having path of Excel file on my personal environment.
By using direct Javascript, it was not working.
But with InAppBrowser it worked as expected.

Thanks,
Palak Patel