How to hide Div tag without page refresh

Posted by Priyanka on Stack Overflow See other posts from Stack Overflow or by Priyanka
Published on 2010-04-22T05:59:21Z Indexed on 2010/04/22 6:03 UTC
Read the original article Hit count: 334

Filed under:
|
|

Hello.I have a page where i add,edit and delete menus.For add and edit I have a separate page.When i add or edit menus,i come on the main page where i display the menus,so i print messages as "menu added" or "menu edited".But when i delete the menu,my page does not get refreshed,because i have written the delete code on the same page sing ajax function as follows:$.ajax( { type: "POST", url: "delete_menu.php", data: data, cache: false,

               success: function()
               {
           parent.fadeOut('slow', function() {$(this).remove();});
           document.getElementById('showDiv').style.display = '';
       }
    }

The page does not get refreshed,so the div containing messages like "menus added or edited" does not get hide.I have given id to Div as showDiv. So can anyone help me to solve this problem.Also when i delete,can anyone tell me how do i display message as "menu deleted" in ajax without page refresh.Thanks in advance.

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript