[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How to submit a form from different domain

Posted on 2014-08-22
Medium Priority
Last Modified: 2014-10-14

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.
Question by:levbao
  • 2
LVL 58

Expert Comment

ID: 40278989
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.

Author Comment

ID: 40279188
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.
LVL 58

Accepted Solution

Gary earned 2000 total points
ID: 40279927
Then they probably don't allow it - there is a security aspect here - if they are entering their login information on your site then you have full access to it, not very secure.
Submitting it through an iframe means loading that sites login page in the iframe - where you have no access to the login information

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question