son.of.the.morning Posted December 7, 2011 Share Posted December 7, 2011 Alright guys, I have a bit of a problem here. I am deleting records using isset($_POST) on the current page but when it submits the records i deleted are still visible. I was thinking of echoing some jquery/ajax to re-load the div that displays the records. Has anyone ever done this before? I dont want the entire page to re-load just that specific area. Quote Link to comment https://forums.phpfreaks.com/topic/252653-php-jquery/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 7, 2011 Share Posted December 7, 2011 Have you determined yet if the problem is due to the order of your logic on the page, because if it is, nothing you do short of fixing the order that the logic deletes and then gets/displays the data in, will correct the problem. What you are doing (making a page request back to the same page that inserts/updates/deletes data and then displays data) is a common task. Throwing more code (jquery/ajax) into the problem won't necessarily solve anything. You use jquery/ajax to add functionality to a page, not fix basic things that don't work right. You didn't actually post your complete requested logic in your existing thread for this problem, so no one here can actually help you with why your page is dong what it is. Quote Link to comment https://forums.phpfreaks.com/topic/252653-php-jquery/#findComment-1295222 Share on other sites More sharing options...
son.of.the.morning Posted December 7, 2011 Author Share Posted December 7, 2011 No this is the problem the logic is in order of which i want it to be becuase of other functionality within the document. This is why i have to result in finding an alt solution. This is the peice of code i need to modify in order to solve this issue. I would prefer a simple echo with jquery/ajax to make a live area. if(isset($_POST['val'])) { include("../scrips/php/cms/delete.multiple.itmes.php"); $table = "blog_posts"; if(isset($_POST['SelectedItems'])) { $ids = $_POST['SelectedItems']; $obj= new MultipleDelete; $obj->delete($ids,$table); echo "<script type='text/javascript'> $('#CommentBox').fadeIn(2000); </script>"; } Quote Link to comment https://forums.phpfreaks.com/topic/252653-php-jquery/#findComment-1295224 Share on other sites More sharing options...
son.of.the.morning Posted December 7, 2011 Author Share Posted December 7, 2011 Finaly found a way around it. I guess i should of listend to you in the first place!! Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/252653-php-jquery/#findComment-1295230 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.