Alright, I'm back for another educated post (got the newsletter btw :(). So I am trying to use AJAX to remove a joke from a list of jokes inside the administration panel. I know basically nothing about AJX, but I am a quick learner.
I know that if I press remove joke I want the HTML table row with the joke to be removed in front of my eyeballs. I don't want to always refresh the page or redirect back to the page (which is what I am doing now). Basically the remove joke button (a link image) will perform a mysql_query to remove the joke from the database. I just want it to disappear from the table in front of me.

So basically:
I click remove link >> AJAX opens up "scripts/revmovejoke.php?id=3"(# changes) >> removes HTML table row (<tr>) right in front of my eyes

PS: I understand t has to do with div classes and IDs, but idk what to do :(

PSS: Jokes are displayed in jokes.php in admin panel

Re: AJAX perform MySQL query and remove html table row 80 80

You know, a good read might do you some good. I would start with something like this: http://articles.sitepoint.com/article/ajax-jquery

BTW: Jquery is a javascript library that makes ajax much easier but if you don't want to use Jquery the same concept applies. Find a good tutorial and spend a few hours on it.

Re: AJAX perform MySQL query and remove html table row 80 80

thank you! (btw, where would I post a topic about which web host should I choose?)

Re: AJAX perform MySQL query and remove html table row 80 80

that depends on what you want out of it but for ajax and mysql, almost any hosting company will work.

Re: AJAX perform MySQL query and remove html table row 80 80

I was just talking about in general, but hanks. *solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.