NaniG Posted October 28, 2013 Share Posted October 28, 2013 Hi to all, I have an jquery modal popup window. So now I want to pass value of recid to modal popup window. HTML Code : <a href="#widget-config #ADD" id="<?php echo $row->recid; ?>" data-toggle="modal" class="btn btn-small add" data-rec-id="<?php echo $row->recid; ?>"><i class="icon-plus"> </i> Add</a> PHP Code : <div id="widget-config"> <div id="ADD" class="modal hide"> <div class="modal-header"> <button data-dismiss="modal" class="close" type="button">×</button> <h4>Add Record</h4> </div> <div class="modal-body"> <p>Are you sure you want to Add Mr.ABCD as Student</p> <p><input type="submit" value="Add" class="btn btn-small" name="AddStudent" /> <input type="reset" name="no" class="btn btn-small" value="No"data-dismiss="modal" /></p> </div> </div> I tried like below. But am not able to get the recid which is from MySQL table. <div id="widget-config"> <div id="ADD" class="modal hide"> <form name="formAddStudent" id="formAddStudent" method="post" action="AddStudent.php"> <script language="javascript"> $("a.add).click(function(e){ var _id; e.preventDefault(); var _id = $(this).attr('id'); }); </script> <div class="modal-header"> <button data-dismiss="modal" class="close" type="button">×</button> <h4>Add Record</h4> </div> <div class="modal-body"> <p>Are you sure you want to Add Mr.ABCD as Student</p> <p><input type="submit" value="Add" class="btn btn-small" name="AddStudent" /> <input type="reset" name="no" class="btn btn-small" value="No"data-dismiss="modal" /></p> </div> </form? </div> </div> Please help me out from these....! Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.