Guys,
I have page
index.php where:
$result = '999';
- <button class ="btn_y" value="<?=$result?>">EDIT</button>
I add AJAX query:
- <script>
- $(document).ready (function(){
- $('.btn_y').click (function (){
- var result= $(this).val();
- $('#dialog-edit').dialog({
- modal: false,
- open:function ()
- {
- $.ajax(function(){
- url:"edit_php",
- data:{ 'result' : result},
- type:"post",
- sucess:function(msg){
- $('#dialog-edit').html(msg)
- }
- });
- },
- resizable: false,
- height: "auto",
- width: 400,
- modal: true,
- position: {
- my: "center",
- at: "center",
- of: window
- },
- buttons: {
- "SAVE": function() {
-
- },
- CLOSE: function() {
-
- }
- }
- });
- }
- )
-
- });
- </script>
Content
edit_php:
- $result = POST['result'];
- <div id="dialog-edit">
- <? echo $result?>
- </div>
but my div not view(
Why?