Kevin

Thanks for the reply.  You are right that you can access the
controller (/chat/test) directly.

BUT!!! Does your browser *also* access it when you
press that form button using the loadJSONDoc call?  *That* is what
isn't working.  Someone told me that the problem may have to do with
caching but I still haven't been able to get verification loadJSONDoc
ever gets invoked even when clearing the cache.

Chris


On Jan 8, 11:54 pm, "Kevin Horn" <[EMAIL PROTECTED]> wrote:
> Hmmm, well, the controller seems to work fine, as I get a nice piece of JSON
> in my web browser when I hit that URL.  So the problem is definitely in your
> javascript.  I worked a lot with loadJSONDoc on a project about a year ago.
> I'll try and find the code.
>
> Tomorrow though.  It's way too late... :(
>
> Kevin Horn
>
> On Jan 9, 2008 1:10 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > I created a tiny TurboGears app with a single button
> > that invokes a Javascript function to change the text of a
> > paragraph.
>
> > You can see for yourself by using app athttp://seberino.org/chat.
> > You can even see all source code     athttp://seberino.org/tiny.
>
> > I tried to bolt onto the this little Javascript function a
> > loadJSONDoc MochiKit call that never seems to
> > work and I don't know why.
>
> > Here is all the Javascript code for this function...
>
> > ======================================
> > var editItem = function() {
> >    var item = document.getElementById("test_paragraph");
> >    item.innerHTML = "This is the new text after JS function called.";
> >    var d = 
> > loadJSONDoc('http://seberino.org/chat/test'<http://seberino.org/chat/test%27>
> > );
> >    d.addCallback(doNothing);
> > }
>
> > var doNothing = function(obj) {
> >    return true;
> > }
> > ======================================
>
> > The way I know if loadJSONDoc was successful is that
> > I created a counter athttp://seberino.org/chat/test
> > that gets incremented whenever accessed/reloaded.
> > I never see the counter increment when I invoke that
> > Javascript function.
>
> > WHY???
>
> > Any help greatly appreciated.
>
> > Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to