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

Recommended Answers

All 4 Replies

You know, a good read might do you some good. I would start with something like this:

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.

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

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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.