Welcome Guest, Not a member yet? Register   Sign In
pseudo (or real) ajax db and view updating?
#6

[eluser]I666I[/eluser]
I don't know why I'm still working on this; 7 hours today alone :'''''(

Is it possible to get a concise example from anyone on wtf I need to do? I've read and re-read the CI ajax info, prototype docs, and hundreds of millions of posts on the forum here. It seems like this should be so simple, but I'm ready to go into nuclear meltdown and punch myself in the throat.

I tried giving up - but it bothers me that I can't get it to work and have resolved to figure it out if I don't commit interneticide first.

OK:

I have a view, k? In it it lists some crap from the db. It pulls that data from the controller, eh? So, in this view, I have something like this (I know it's gross):
Code:
function submit(){
                        new Ajax.Request('/uhh/delViaAJAX/$stuff/$id',
                          {
                            method:'post',
                          onSuccess: function(transport, json){
                              alert(\"YOU READ THIS BECUZ DUNNO\");
    
                            },
                            onFailure: function(){ alert('FAILDOZER') }
                          })
                        };

                        </script>";
So it always alerts the onSuccess function.

The problem is that I can't seem to figure out what should be in the controller that is referenced in the js (/uhh/delViaAJAX/$stuff/$id)... I guess I'd have the code that did the db crap; but how do I send something, ANYTHING back to the page that has the form/data (where I pressed the delete button)?

Thanks to anyone willing to even read this, let alone respond...


Messages In This Thread
pseudo (or real) ajax db and view updating? - by El Forum - 09-28-2009, 08:52 AM
pseudo (or real) ajax db and view updating? - by El Forum - 09-28-2009, 06:30 PM
pseudo (or real) ajax db and view updating? - by El Forum - 09-29-2009, 04:10 AM
pseudo (or real) ajax db and view updating? - by El Forum - 09-29-2009, 05:58 AM
pseudo (or real) ajax db and view updating? - by El Forum - 09-30-2009, 07:42 AM
pseudo (or real) ajax db and view updating? - by El Forum - 09-30-2009, 01:51 PM
pseudo (or real) ajax db and view updating? - by El Forum - 10-01-2009, 02:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB