0

Sorry if this question if duplicated but i can't find the solution of the next problem:

I have a page A with the next button:

<input type='button' id='reload' onclick='reload_modal()' value='Reload Modal' />

And, i have the page B with a div with modal class

<div class="modal inmodal" id="modal_div" tabindex="-1" role="dialog"  > 
  <!-- content -->
</div>

I would like to know if i can reload the model from page B, when i click the button from the page A.

Pabloco
  • 15
  • 5
  • 1
    You didnt finish your question? Also that is just an input and a div not pages? Are you saying your modal is a "page" or these two elements are on completely separate pages? – GifCo May 16 '19 at 16:22
  • They are element from separated pages. Sorry for the incomplete information. – Pabloco May 16 '19 at 16:24
  • So are you wanting to click the reload on page a, and reload the modal on page b? – Taplar May 16 '19 at 16:28
  • 1
    I don't think we have enough info to answer your question. You're not saying where this content is coming from, whether page A and page B are actually just different elements (e.g., a modal) in the same page, whether there are `iframe`s involved, etc. – Marc May 16 '19 at 16:31
  • Are you saying you want to load the content from page B in page A as a modal? – imvain2 May 16 '19 at 16:31
  • What you actually want – Ricky May 16 '19 at 16:41
  • I edited the main post. – Pabloco May 16 '19 at 17:57

1 Answers1

0

Hey there if you want to click on a button on page A and wanted that it will open a modal in page B then you have to redirect to page B on page A button click and use $("#idmodal").modal('show'); on the page B inside document ready function. Please share if you want something else.

Ricky
  • 488
  • 3
  • 14