Jump to content

PHP & Jquery


son.of.the.morning

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/252653-php-jquery/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/252653-php-jquery/#findComment-1295222
Share on other sites

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>";
                        	

					}

Link to comment
https://forums.phpfreaks.com/topic/252653-php-jquery/#findComment-1295224
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.