0

I am struggling for the past two days, also not even know whether its possible to do or not. Actually, my requirement is simple, i need to pass the logged-in user details from one application to another application (external). Problem is i don't have a source code of external application. Is it possible to fill the user details automatically and click the login button of external application. Can any one please suggest me whether its possible or not.

I have tried by the following approach which i have found in stack-overflow

 var htmlForm = "<form id='myform' method='POST' action='//www.xxx.com/?/yyyy/Index.cshtml'>" +
            //    "<input type='hidden' id='usr_name' value='xxxx' />" +
            //"</form>";

            ////Submit the form
        //$(htmlForm).appendTo("body").submit();
Ilaya Bharathi
  • 93
  • 1
  • 14
  • Yes, you can do this either from the client or from the server side. I think the most promising way is an ajax post request. You can easily do that with jquery (which you're using obviously). – Rob Sep 10 '18 at 11:28
  • If the other website uses standard form transmission (as opposed to AJAX) and doesn't reject the request based on the wrong referrer, this should be possible. We would have to take a look at the other website though. Reference: https://stackoverflow.com/questions/11423682/cross-domain-form-posting –  Sep 10 '18 at 11:34
  • what is the problem with current code? is there any console errors or network errors? – Dinesh undefined Sep 10 '18 at 11:43
  • Thanks for the reply. But how can i get the values and submit the form in external application. – Ilaya Bharathi Sep 10 '18 at 12:01
  • not getting error its redirecting only. but i need to fill the user details and click the login button automatically – Ilaya Bharathi Sep 10 '18 at 12:03

0 Answers0