[TriLUG] Javascript ( and jQuery ) questions
Brian McCullough via TriLUG
trilug at trilug.org
Sun Apr 19 21:25:44 EDT 2015
On Sun, Apr 19, 2015 at 08:33:32AM -0400, Scott Chilcote wrote:
> Hi Brian,
Hi again Scott, and anybody else who is listening.
> 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?
I have been thinking about this problem again today, while I was
fighting AT&T and U-Verse and IPv6.
It occurred to me that perhaps a drag-and-drop-type interface might be a
better way of attacking the issue.
I have two lists. I have a list of counties and a list of names within
each county. That is currently implemented with a jQuery accordion.
The county name is the h3 element of the accordion, and the list of
names is a select-list "inside" that element.
In the other column, I have a list of things that I want to put the
names under. You might think of it being very similar to what I just
described, with two lists of counties, and the user wanting to copy
names from the "available" list to the "chosen" list. Each name needs
to be within a particular group, like the county name list. In other
words, a name from the "available" list could be put under the first
heading of the "chosen" list, or the third, or the sixth, or all, but
each position is significant.
In other words, you may choose to use the same name multiple places in
the "chosen" list. I don't know whether this is significant in the
design or not.
Once the user is finished, I need the "chosen" list back on the server,
so that I can record those choices in the database.
I do not claim to be a UI programmer, most of my life is spent in the
server, so if there is a reasonable way of accomplishing this in a
different manner, I would love to hear it.
As I said earlier, I was trying to do it in different steps, where the
choices are made from the "available" list for only one of the sections
( headings ) of the "chosen" list and then a "do it" button is clicked
to record the choices in the database, following which the div is
reloaded with that result.
If drag-and-drop can be done in a better way, or if somebody can come up
with a different way to get where I need to go, that would be great.
Thank you,
Brian
More information about the TriLUG
mailing list