Announcement

Collapse
No announcement yet.

bootstrap modal using ajax content (miva script) with links - open in modal?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    bootstrap modal using ajax content (miva script) with links - open in modal?

    I have a modal that is populated with mivascript via AJAX.
    This content has a link in it.
    Is it possible to click this link, and have it refresh the modal with the new content?
    Or perhaps open a new modal?
    Any ideas?

    Mivascript
    bootstrap 4
    William Gilligan - Orange Marmalade, Inc.
    www.OrangeMarmaladeinc.com

    #2
    Unless the modal window is an iframe, clicking a link will always reload the full page. You would need to add some JS so that when the link is clicked, it does another ajax call to get the contents of the link and update the modal HTML
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      In addition to Brennan's reply:

      Link doesn't have to be a link really, it may just look like a link.

      Code:
      <div id="request-ajax" class="to-look-like-a-link">This is my fake link</div>
      
      $('#request-ajax').click(function(){
          do_another_ajax_request();
      });

      Comment

      Working...
      X