[TriLUG] Javascript ( and jQuery ) questions

Scott Chilcote via TriLUG trilug at trilug.org
Sun Apr 19 08:33:32 EDT 2015


Hi Brian, 

This sounds a lot like something I did using Python and jQuery recently. One thing that I observed is that with Ajax the debugger breakpoints stop working, presumably because the transaction between the browser and the server has to run to completion. 

The part of your description that I don't understand is that it seems as if you are sending the accordion to the server. The accordion is a browser display widget. I requested the data that I needed from the server using Ajax, then used it to build tables to put in the accordion. 

The accordion object remained local to the browser. 

Does this sound like what you want to accomplish? 

Scott C.

On Apr 18, 2015 10:41 PM, Brian McCullough via TriLUG <trilug at trilug.org> wrote:
>
> Folks,
>
> I am getting VERY frustrated with a part of a project that I am working
> on, so have come back to the Oracle for assistance.  As usual, I should
> probably have done this some time ago, but, better late than never, as I
> have heard.
>
> I have a JS function that collects various pieces of information and
> then calls a server routine ( PHP ) which is supposed to act on that
> information and send back a response. ( AJAX, as it happens )
>
> However, even though I can trace some of this data through the JS code (
> although that is another issue that I will mention ), I can't seem to
> get it into a format that the system will pass to the server.
>
> For instance, I have something that looks like:
>
> var foo = jQuery( '.thisclass' );
> alert( 'foo = ' + foo );
> var foo_ser = foo.serialize();
> alert( 'foo_ser = ' + foo_ser );
>
> more code to prepare the call to the server.
>
> The first alert() tells me that foo is an object.  The second alert
> shows me an empty string.
>
> I have also tried .val(), which also fails.
>
> JSON.stringify() complains that there are circular references, or words
> to that effect, although I don't quite know where that would have come
> from.
>
> Incidentally, foo is a jQuery accordion.
>
> Any suggestions to get me out of the hole that I seem to have dug
> myself?
>
> Thank you,
> Brian
>
> -- 
> This message was sent to: Scott R. Chilcote <scottchilcote at ncrrbiz.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web : http://www.trilug.org/mailman/options/trilug/scottchilcote%40ncrrbiz.com
> Welcome to TriLUG: http://trilug.org/welcome


More information about the TriLUG mailing list