1
<input type="button" class="btn btn-primary btn-lg btn-block"  value="(AAP)"  data-toggle="modal" href="#teklif{$foo}"> 

I want to send foo value. foo == number

like 0,1,2..

  <div id="teklif" class="chat_modal modal fade hide">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">x</button>        
  </div>
  <div class="modal-body">


      <section class="welly form_align">
        <br/>
        <br/>
        <span id="status"> {$foo}</span>
        <br/>
      </section>

  </div>
    <div class="modal-footer">        
   <span id="statusteklifc"></span>
  </div> 
</div>

How to send value to modal ? and i sended value smarty variable.

i want to equal value:

 <span id="status"> {$foo} == 2</span>

i wan to make it.

tomsmith
  • 15
  • 4

1 Answers1

0

modal is simply part of your DOM so You can change it simply:

$('#status').html(any_variable);

But You need add some information when do You want to send this value.

If You want to read value from button when modal is displayed You can:

$('#teklif').on('shown.bs.modal', function (e) {
  $('#status').html($('#button_ID').html());
});
WBAR
  • 4,924
  • 7
  • 47
  • 81