Welcome Guest, Not a member yet? Register   Sign In
Unable to implement Ajax Refresh using code-ignitor
#1

[eluser]Unknown[/eluser]
Hello,

We are building an application that enables users to post questions in different categories and seek answers. The main panel for a user displays questions that are already posted in selected category.

We are having difficulty in implementing the delete function for each question using AJAX. We do not want the entire panel to refresh....Only the panel where the question is being displayed has to refresh and the question should be deleted from the control-panel.

Can someone please help us implement this functionality using CodeIgnitor? We have tried everything but the entire control-panel refreshes....we only want that question to refresh using AJAX.

thanks.
#2

[eluser]Thorpe Obazee[/eluser]
set css style to display:none after you delete the record via Ajax. It doesn't mean that it's not in the markup but the user wouldn't see the 'deleted' record.
#3

[eluser]slowgary[/eluser]
Are you using a JavaScript framework?

If I understand your problem correctly, you just want to remove an element after an AJAX request, is that correct?

I like to use the jQuery framework as it makes everything so easy. You could do something like this:
Code:
$('#elementid').remove();

I'm not exactly sure what you're trying to do though. You should post a link or some code.




Theme © iAndrew 2016 - Forum software by © MyBB