Jump to content

Passing Variable to Modal


DrTrans

Recommended Posts

So i have 2 files I'm working with I need to get ReportID to the Modal.php ajax handler

 

 

modal.php

<! Request Application !>
<div class="modal small hide fade" id="ReportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="pull-right btn " data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Get Report</h3>
  </div>  
  
  
  <div class="modal-body">
 <script type="text/javascript">
  
    $.ajax({
        cache: false,
        type: 'POST',
        url: 'ajax/getReport.php',
        data: 'id='+reportID,
        success: function(invdata) 
        {
            $('#report').show().html(invdata);
        }
    });
  </script> 
  
     <div id="report"></div>
  </div>
</div>
Link to comment
https://forums.phpfreaks.com/topic/284476-passing-variable-to-modal/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.