Put one site inside another as checkout light box

Posted on

Question :

I’m a web developer and I came across a problem where I need to display a registration form inside another page.
The client does not want your user to be directed to our page, I have tried to instruct him to use iframe, but this has resulted in a horrible mobile experience.
There are examples that can do exactly what I want most outside that are developed in javascript I do not quite understand how they work and I could not find search terms to do something similar, just looking at their code makes it difficult to understand because they are possibly minified with webpack or gulp.

Here are some examples:






My client in the case would follow the same examples, where I would put a script tag and the dependency data, thus opening a modal where the content that is inside would be controlled by my site giving an user experience of a distributed system that does not changes site.
I know I did not post an error or code and I’m not asking for a code made rather a directed how to do something similar.


Answer :

I tried in a way that might work but I’m not sure it will work 100% because certain plugins may not load

<div id="load"></div>


In this example you can display that site on your page only if you have the following code at the top of the page on the site you want to display

 header("Access-Control-Allow-Origin: *");

Feel free to experiment with this url of the site.


Leave a Reply

Your email address will not be published. Required fields are marked *