Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since you appear to be using bootstrap, it actually has this built in so that you don't have to do the ajax call yourself. Take a look at the <code>remote</code> option for <a href="http://getbootstrap.com/javascript/#modals" rel="nofollow noreferrer">modals</a>.</p> <p>The content that you return simply needs to be the HTML fragment you want to be in the content of the modal.</p> <p>An example of how you would return the html for the modal if you're using express is as follows (using jade as your templating engine but it could be whatever you like):</p> <pre><code>app.set('view engine', 'jade'); app.get( '/modalFeedback' ,function(req, res, next){ res.render('/modalFeedback.jade', { user: req.user }); } ); </code></pre> <p>The template, in this case <code>modalFeedback.jade</code> would have just html in it, well a jade version of html anyway and this is the html you wish to show up in the modal. You could even instead of simply rendering the template at first do some checks if the user is admin or whatever. Depending on the check then you could choose which template to render. The key is <code>res.render</code> goes and gets the file passing it the data you provide and will return it to the browser call from the modal. </p> <p><strong>Update</strong>: <code>remote</code> is <a href="https://getbootstrap.com/docs/3.3/javascript/#modals-options" rel="nofollow noreferrer">deprecated</a> since v3.3.0 and removed in v4. (This would have been better suited as a comment but is likely to be missed, hence putting it here to protect people's time in managing backward compatibility issues later)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload