Bootstrap 5: Load Remote Content in Modal via URL

Job ID: 32740186

Budget: $50 – $100 USD

Hello.

I'm trying to use Bootstrap 5 (no jQuery!) to open a remote file as a modal and pass a variable (via $_GET in the URL) to that remote file. I've gotten the following code to load the variable length contents of the remote file; however, there are several problems:

1. The code seems way to complex when the end goal is to simply have a modal button on one page open a modal that is housed on another page.

2. Other javascript tools (such as Toms-Select in my example), do not work when loaded from test.html, but do work when testmodal.php?data1=OPTION3 is loaded directly.

I've tried everything--including opening the remote file as an iframe--but nothing really works. For example, the iframe solution can't vary the height of the modal-body based on the contents of the external file.

If you are familiar with Bootstrap 5 and with non-jquery javascript, I'd love to hire you to solve this puzzle.

Richard
Related categories: JavaScript Bootstrap