Link to home
Start Free TrialLog in
Avatar of levbao
levbao

asked on

How to submit a form from different domain

Hi,

There's an existing application I need to incorporate.

First thing is I need to create a login page to login the system.  

I was thinking about having an iframe on my login page.  The iframe's src would be the system's login page.  When I click submit on my login page, it would submit the iframe.

I got an error incorporating the iframe:
Refused to display 'http://www.mysite.com/jbosslegore/APlegore/faces/login.xhtml' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Thank you.
Avatar of Gary
Gary
Flag of Ireland image

The ACTION attribute of a form can be an external website, you just need to set the username and password inputs name to the same as the external website uses.

Whether that website allows it is another thing.
Avatar of levbao
levbao

ASKER

Hi Gary,

I did try to copy the form inputs on the system's login page to my login page but it didn't do anything only redirects to the system's login page.

I was told that submiting directly to the system's login page wouldn't work and I have to submit it through an iframe.

Thanks Gary.
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial