How to submit a form from different domain

Posted on 2014-08-22
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 '' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Thank you.
Question by:levbao
    LVL 58

    Expert Comment

    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

    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

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    "I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
    Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
    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 position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now