Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-07 Thread Godmar Back
On Tue, Dec 6, 2011 at 3:40 PM, Doran, Michael D do...@uta.edu wrote: Current trends certainly go in the opposite direction, look at jQuery Mobile. I agree that jQuery Mobile is very popular now. However, that in no way negates the caution. One could consider it as a tragedy of the

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Erik Hatcher
California State University -Original Message- From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Nate Hill Sent: Monday, December 05, 2011 3:00 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable As always, I

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Andreas Orphanides
Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable As always, I provided too little information. Dave, it's much more involved than that I'm trying to make a kind of visual browser of popular materials from one of our branches from a .csv file. In order

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Nate Vack
On Mon, Dec 5, 2011 at 8:04 PM, Godmar Back god...@gmail.com wrote: That said, I'm genuinely interested in what others are thinking/have experienced. I've heard the don't send HTML argument, but in my experience, writing HTML template code and then Javascript code to generate the same HTML is

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Nate Vack
On Mon, Dec 5, 2011 at 5:00 PM, Nate Hill nathanielh...@gmail.com wrote: Here's the work in process, and I believe it will only work in Chrome right now. http://www.natehill.net/vizstuff/donerightclasses.php In this case, it looks like there really isn't that much data. I'd preprocess

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Godmar Back
On Tue, Dec 6, 2011 at 8:38 AM, Erik Hatcher erikhatc...@mac.com wrote: I'm with jrock on this one. But maybe I'm a luddite that didn't get the memo either (but I am credited for being one of the instrumental folks in the Ajax world, heh - in one or more of the Ajax books out there, us old

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Jonathan Rochkind
Is it too late to dedicate a presentation slot to a performance? (Whoa, actually, seriously, a Code4Lib talent show would be AWESOME.) The rails conf in baltimore a couple years ago had an evening jam session slot. Sadly, it's really a pain bringing the accordion on an airplane.

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Jonathan Rochkind
to be fashionable! From: Code for Libraries [CODE4LIB@LISTSERV.ND.EDU] on behalf of Godmar Back [god...@gmail.com] Sent: Tuesday, December 06, 2011 9:34 AM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable On Tue

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Doran, Michael D
/ -Original Message- From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Godmar Back Sent: Monday, December 05, 2011 5:31 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable FWIW, I would not send HTML back

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Walker, David
request to update a PHP variable I attached the app as it stands now. There's something wrong w/ the regex matching in catscrape.php so only some of the images are coming through. A bit more background info: Someone said 'it's not that much data'. Indeed it isn't, but that is because I

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Dave Caroline
I dont understand the thinking and waste of time scanning entire csv files where a database table with good indexing can be a lot faster and use less server memory. Do the work once up front when the data becomes available not on every page draw. I subscribe to the read/send and mangle as little

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Nate Hill
csv files are what I have- they are easy for the not-technically inclined staff to create and then save to a folder. I was really just hoping to make this easy on the people who make the reports. On Tue, Dec 6, 2011 at 10:21 AM, Dave Caroline dave.thearchiv...@gmail.comwrote: I dont

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Godmar Back
On Tue, Dec 6, 2011 at 11:18 AM, Nate Hill nathanielh...@gmail.com wrote: I attached the app as it stands now. There's something wrong w/ the regex matching in catscrape.php so only some of the images are coming through. No, it's not the regexp. You're simply scraping syndetics links,

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Dave Caroline
php has some nice and fast csv parsing abilities, use them as a source for your database. can then remove any regexp need still simple for the users snippet taken from one of my csv readers showing the prints in comments so you can see the data in an array this also keeps memory footprint down

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Godmar Back
On Tue, Dec 6, 2011 at 11:22 AM, Doran, Michael D do...@uta.edu wrote: You had earlier asked the question whether to do things client or server side - well in this example, the correct answer is to do it client-side. (Yours is a read-only application, where none of the advantages of

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Jonathan Rochkind
On 12/6/2011 1:42 PM, Godmar Back wrote: Current trends certainly go in the opposite direction, look at jQuery Mobile. Hmm, JQuery mobile still operates on valid and functional HTML delivered by the server. In fact, one of the designs of JQuery mobile is indeed to degrade to a non-JS version

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Godmar Back
On Tue, Dec 6, 2011 at 1:57 PM, Jonathan Rochkind rochk...@jhu.edu wrote: On 12/6/2011 1:42 PM, Godmar Back wrote: Current trends certainly go in the opposite direction, look at jQuery Mobile. Hmm, JQuery mobile still operates on valid and functional HTML delivered by the server. In fact,

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-06 Thread Doran, Michael D
-Original Message- From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Godmar Back Sent: Tuesday, December 06, 2011 12:43 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable On Tue, Dec 6, 2011 at 11:22 AM, Doran

[CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Nate Hill
If I have in my PHP script a variable... $searchterm = 'Drawing'; And I want to update 'Drawing' to be 'Cooking' w/ a jQuery hover effect on the client side then I need to make an Ajax request, correct? What I can't figure out is what that is supposed to look like... something like... $.ajax({

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Jonathan Rochkind
I'm not sure what you're trying to do makes sense. You'd have to write some PHP code to receive the AJAX request and use it to update the variable. There's nothing in PHP that will do this automatically. However, since, I believe, PHP variables are usually only 'in scope' for the context of

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Walker, David
] On Behalf Of Nate Hill Sent: Monday, December 05, 2011 2:09 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: [CODE4LIB] jQuery Ajax request to update a PHP variable If I have in my PHP script a variable... $searchterm = 'Drawing'; And I want to update 'Drawing' to be 'Cooking' w/ a jQuery hover effect

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Cary Gordon
I can't tell what you are requesting via Ajax; I am not sure what you want to hover over; and I am not sure what the relationship of drawing, cooking and hovering is. I am guessing that $searchterm gets submitted to a search, but does it get submitted via ajax? What happens then? Thanks, Cary

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Nate Hill
: Monday, December 05, 2011 2:09 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: [CODE4LIB] jQuery Ajax request to update a PHP variable If I have in my PHP script a variable... $searchterm = 'Drawing'; And I want to update 'Drawing' to be 'Cooking' w/ a jQuery hover effect on the client side then I

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Walker, David
To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable As always, I provided too little information. Dave, it's much more involved than that I'm trying to make a kind of visual browser of popular materials from one of our branches from a .csv file

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Nate Hill
- From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Nate Hill Sent: Monday, December 05, 2011 3:00 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable As always, I provided too little information. Dave, it's much more

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Godmar Back
@LISTSERV.ND.EDU] On Behalf Of Nate Hill Sent: Monday, December 05, 2011 3:00 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable As always, I provided too little information. Dave, it's much more involved than that I'm trying

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Jonathan Rochkind
University -Original Message- From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Nate Hill Sent: Monday, December 05, 2011 3:00 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable As always, I provided too little information

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Cary Gordon
Subject: Re: [CODE4LIB] jQuery Ajax request to update a PHP variable As always, I provided too little information.  Dave, it's much more involved than that I'm trying to make a kind of visual browser of popular materials from one of our branches from a .csv file. In order to display book

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Godmar Back
On Mon, Dec 5, 2011 at 6:45 PM, Jonathan Rochkind rochk...@jhu.edu wrote: I still like sending HTML back from my server. I guess I never got the message that that was out of style, heh. I suppose there are always some stalwart defenders of the status quo ;-) More seriously, I think I'd like

Re: [CODE4LIB] jQuery Ajax request to update a PHP variable

2011-12-05 Thread Nate Hill
I'd be really curious to see the different ways you all speak of accomplishing this, and would stand to learn a lot along the way. As a beginner with much of this, I have patched together this app using methods and means that I know, rather than the 'right' way. So, that said, I'm sure I'm doing