I was wondering how i would go about doing this:
basically i want to echo out my results from a table but i want to use jquery as i want to be able to put a x button on each results then if that is clicked the results i removed from the page and also from the database i was thinking delete from the database and on delete refresh div that all the results are echo'd out into? does that make sence?
thanks
ash
echo using jquery
echo using jquery
I would put a signature.. BUT, i don't have the time.
Re: echo using jquery
The fact that you are using JavaScript to add some kind of page effect means nothing.
You can still output data from the database with php,
You can still output data from the database with php,
Re: echo using jquery
yeah i know that.. its the fact when i press delete i want it to disapear like fadeout effect type thing..
I would put a signature.. BUT, i don't have the time.
Re: echo using jquery
So the problem is using the fade method ?
What are you having trouble with ?
I am the wrong person to ask on jQuery things, but I will have a go
What are you having trouble with ?
I am the wrong person to ask on jQuery things, but I will have a go
Re: echo using jquery
basically right i want to echo out the results like i currently am in php BUT if the user i admin i on hover a delete button will appear i can do that the show if admin the show on hover i cant not yet.. but the main thing is when that delete button is pressed i want that result to fade out and the other results to close in together as to say that result never existed but at the same time as fading out delete that record from the database...
I would put a signature.. BUT, i don't have the time.
Re: echo using jquery
That would ave to be done via an ajax request, I have no idea on all the visual stuff, but to make it remove from the db you want to use AJAXashwood wrote:but at the same time as fading out delete that record from the database...
Probably want to create a function that does the ajax request, and then shows an error if it fails, or removes the item if not.
function remove_item(item_id){ // do things }Then this function should be called using the onclick event for the X button or what ever you have,
Re: echo using jquery
jacek wrote:That would ave to be done via an ajax request, I have no idea on all the visual stuff, but to make it remove from the db you want to use AJAXashwood wrote:but at the same time as fading out delete that record from the database...
Probably want to create a function that does the ajax request, and then shows an error if it fails, or removes the item if not.
function remove_item(item_id){ // do things }Then this function should be called using the onclick event for the X button or what ever you have,
see now i can work with the above and do the fading myself using jquery I THINK its a long shot but im going to have a go.. in that function you provided //do things.. could i not get it to call a php file that has the delete from... in it?
I would put a signature.. BUT, i don't have the time.
Re: echo using jquery
That's what I meant by thingsashwood wrote:in that function you provided //do things.. could i not get it to call a php file that has the delete from... in it?
Re: echo using jquery
should be fairly easy now then thanks manjacek wrote:That's what I meant by thingsashwood wrote:in that function you provided //do things.. could i not get it to call a php file that has the delete from... in it?
I would put a signature.. BUT, i don't have the time.