I would like to find out how a modal in a different page can be opened from a separate page
Not sure what you’re trying to do here, or if you’re creating a problem where no problem exists.
If you’re on your home page and you want to click a button while you’re on the home page and have it open a modal that’s on your “contact us” page, then simply copy the modal component that is on your “contact us” page to your “home page”, and then you can open it.
You can have the same modal with the same ID on multiple pages.
Having issues working on the backend, so thought it would be better having the modal on separate page. but I get your point. I think will need to work out on the same rather than getting it on a separate page. Thanks!
Or easier yet, just link to the page and use an anchor tag to take people directly to the location of the model on the page (if it’s further down the page that is). Truly it’s just loading one more page and most mobile devices can handle that these days pretty easily.
setItem(). Or through various other approaches such as by adding a
hash as part of the url you are opening, etc.
When the other page loads use a
load event to read your chosen logic. If via
localStorage() then use
getItem() and if the key is detected open the modal popup. After you call the modal to open simply
removeItem() or clear() from the
You could also forgo the standard Bootstrap modal and create one in pure CSS which could be called from any page. I have an old, non-responsive website where I used such a technique. You can click the “request a quote” in the upper right and it opens the same modal no matter what page you’re on.
any help on how to use this function:
Like where do i go from here: