4
I am a web developer and I came across a problem where I need to display a registration form within another page. The customer does not want his user to be directed to our page, I tried to instruct him to use iframe more this 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 understand very well how they work and I could not find search terms to do something similar, Just looking at their code becomes difficult to understand because they are possibly minified with webpack or Gulp.
Following are examples:
or
or
https://docs.mundipagg.com/docs/checkout-lightbox
My client in the case would follow the same examples, where he would put a script tag and the dependency data, thus opening a modal where the content inside would be controlled by my site giving an experience to the user a distributed system that does not change site. I know I didn’t post an error or code and I’m not asking for a code made but a guide of how to do something similar.
So brother, in such cases, the processing is actually performed in the service (pagseguro, etc). But the form is in your system. Not an external HTML no. You should use the events of the . js framework on the HTML you will mount or what they suggest...
– DiegoSantos
Have you researched the PHP Include, or the tag
<object>
of HTML ?– hugocsl
@Diegosantos using the framework events would be to mount the code inside his page ? Because in my case I have clients who use different js framework, I would have to assemble a part of my site for each framework, what I thought was a flashy javascript which would take several frameworks at once. And the same would only import this code to his website, using a script tag pointed at my server. This configuration I’m not quite sure how to start.
– Caio Michel dos Santos
So, if you use their . js, this JS itself will make requests to their system directly. That’s already a behavior of these frameworks. all you have to do is configure some information, usually tokens, etc. You will have to mount only one HTML and connect the dots.
– DiegoSantos