Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-05 Thread Kristina Anderson
Yes, that is exactly what I thought I meant to explain about the hidden form... you can't pass the date directly into a PHP variable! So you'd have to use document.form.value... In my defense I have a horrible hangover...? :) > I'm see a lot of odd code in the past few posts. $'s mixed in w

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-05 Thread Rolan Yang
I'm see a lot of odd code in the past few posts. $'s mixed in with javascript and attempts to blend client side javascript variables with server side php variables. Misleading code that simply wont work. Here's a working example for ya: test var date = new Date(); var d = date.getDate(); var

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-05 Thread Kristina Anderson
new Image()).src = 'http://www.localhost/showdatum.php? $datum='+"$datum"; > > > > > > > > > showdatum.php > === > echo('$datum = ' . $datum . ""); ?> > > > - Original Message - &

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-05 Thread PaulCheung
CTED]> To: "NYPHP Talk" Sent: Monday, March 31, 2008 2:27 PM Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP At 6:07 PM -0400 3/30/08, Daniel Convissor wrote: Hi Paul: On Sun, Mar 30, 2008 at 09:18:10PM +0100, PaulCheung wrote: The problem is I cannot transfe

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-04 Thread David Hauenstein
jQuery (http://jquery.com/) is the way to go with JS frameworks. I've used it extensively and even wrote a plugin (http://davehauenstein.com/blog/archives/28 ). But if you want to explore, i provided list of some of the most popular JS frameworks. Have fun. Some other good ones: http://www.

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-04 Thread Steve Manes
Joseph Crawford wrote: XAJAX is also something worth looking into. "Me Too" for Xajax. ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Par

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-04 Thread Joseph Crawford
Original Message From: Susan Shemin <[EMAIL PROTECTED]> To: NYPHP Talk Sent: Thursday, April 3, 2008 6:37:39 PM Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP funny you say that -- I just was reading an article this afternoon on devx.com about prototype and script-i-licious

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-04 Thread Brian D.
PROTECTED]> > To: NYPHP Talk > Sent: Thursday, April 3, 2008 6:37:39 PM > Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP > > > funny you say that -- I just was reading an article this afternoon on > devx.com about prototype and script-i-licious and I'm g

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-03 Thread Susan Shemin
sorry, it's script.aculo.us and prototype here's the article: http://www.devx.com/webdev/Article/37574 - Original Message From: Susan Shemin <[EMAIL PROTECTED]> To: NYPHP Talk Sent: Thursday, April 3, 2008 6:37:39 PM Subject: Re: [nyphp-talk] Passing JAVASCRIPT

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-03 Thread Susan Shemin
Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP On Tue, Apr 1, 2008 at 4:21 AM, Susan Shemin <[EMAIL PROTECTED]> wrote: So I'm off to brush up on my Ajax and get it working, because except for the redirect, I can only see that Ajax will work. Though it is a bit off topic,

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-03 Thread Jiju Thomas Mathew
On Tue, Apr 1, 2008 at 4:21 AM, Susan Shemin <[EMAIL PROTECTED]> wrote: > > > So I'm off to brush up on my Ajax and get it working, because except for > the redirect, I can only see that Ajax will work. > Though it is a bit off topic, I suggest that you use one of the available libraries out there

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-02 Thread Kristina Anderson
derson" <[EMAIL PROTECTED]> > To: "NYPHP Talk" > Sent: Wednesday, April 02, 2008 12:22 AM > Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP > > > > One of the projects I inherited recently contains the following code > > which

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread PaulCheung
t; <[EMAIL PROTECTED]> To: "NYPHP Talk" Sent: Tuesday, April 01, 2008 8:54 PM Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP Why not just store the client time zone and store server data/time?? PaulCheung wrote: Hi All I am trying to do is transfer the dat

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread John Campbell
On Tue, Apr 1, 2008 at 7:22 PM, Kristina Anderson <[EMAIL PROTECTED]> wrote: > One of the projects I inherited recently contains the following code > which is used basically to store the record ID and editstate in the > URL's querystring. When I first saw it, I was scratching my head > saying,

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread Kristina Anderson
One of the projects I inherited recently contains the following code which is used basically to store the record ID and editstate in the URL's querystring. When I first saw it, I was scratching my head saying, why would anyone think they needed to do it this way? (My preferred way to store d

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread tedd
At 11:48 AM -0400 4/1/08, John Campbell wrote: > http://www.webbytedd.com/b/ajax/ Your code is fine for trivial example pages, but would be a disaster for a production application. 1) The use of the global 'http' is sloppy and limiting. 2) You need to highlight the selected menu after the ca

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread Donald J Organ IV
/date for each new record created . Paul - Original Message - From: "Brian D." <[EMAIL PROTECTED]> To: "NYPHP Talk" Sent: Tuesday, April 01, 2008 12:25 AM Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP Susan hit the nail on the head. She's

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread PaulCheung
ian D." <[EMAIL PROTECTED]> To: "NYPHP Talk" Sent: Tuesday, April 01, 2008 12:25 AM Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP Susan hit the nail on the head. She's pointing out why I said it was a "hack" - if you're not understanding

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread John Campbell
On Tue, Apr 1, 2008 at 10:37 AM, tedd <[EMAIL PROTECTED]> wrote: > At 10:18 AM -0400 4/1/08, John Campbell wrote: > > > >The Ajax method is the best, but will be a real pain in the ass to > >implement without a javascript library. > > Why so? Wasn't it you who suggested an image hack to avoid

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread David Mintz
On Tue, Apr 1, 2008 at 10:37 AM, tedd <[EMAIL PROTECTED]> wrote: > Ajax can be very simple. > > No doubt but that PHP can be a prolific author of Javascript without things becoming overly complicated. Lately I have been using a home-grown PHP/Javscript helper for Ajax contexts. It emits a content-

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread tedd
At 10:18 AM -0400 4/1/08, John Campbell wrote: The Ajax method is the best, but will be a real pain in the ass to implement without a javascript library. Why so? I do Ajax all the time with a simple 50 line javascript routine. No large libraries. Check this: http://www.webbytedd.com/b/aja

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread John Campbell
I can think of a half a dozen solutions for sending data from javascript back to the server, below are three. 1) Have javscript set a cookie: var clienttime = ... // long caluculation setCookie('ct',clienttime,365); 2) Have javascript send the data as a get variable (you could also auto submit

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-04-01 Thread tedd
At 3:51 PM -0700 3/31/08, Susan Shemin wrote: Just as this question came up here, I was again researching it on the internet, and very clearly saw that the crux of the problem is that Javascript is client side and PHP server side, meaning the 2 don't mix unless in Ajax. They mix Okay, but don

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-31 Thread Brian D.
Susan hit the nail on the head. She's pointing out why I said it was a "hack" - if you're not understanding the problem correctly (the difference between client-side and server-side) then the proposed solution might be "simple and workable" but it's still wrong. More to the point, what exactly are

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-31 Thread Susan Shemin
I'm watching this discussion with interest since I asked a similar question last month (about sending PHP stats from a JS onclick event). The answer that came up was to put a redirect to the link page, run the PHP script on a redirect.php page and then send it on to the destination. I've set i

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-31 Thread tedd
At 9:32 AM -0400 3/31/08, Brian D. wrote: > And don't forget this way: :-) var a = 1; (new Image()).src = '/myscript.php?a='+ a; I'm going to recommend *against* that. That works, but it's an ugly hack, and often when you're trying to do something like this you're not addressing a deep

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-31 Thread PaulCheung
Datum; document.write ($datum); It was here I thought by using an include I could overcome the problem with transfer of Javascript data to PHP. Unless there is a simpler way I will have to swat up on AJAX Paul ----- Original Message - From: "Tom Melendez" <[EMAIL PROTEC

RE: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-31 Thread Peter Sawczynec
n off output buffering output all the content created above ?> -Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of tedd Sent: Monday, March 31, 2008 9:28 AM To: NYPHP Talk Subject: Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP At 6:07 PM -0400

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-31 Thread Brian D.
> And don't forget this way: :-) > > var a = 1; > (new Image()).src = '/myscript.php?a='+ a; I'm going to recommend *against* that. That works, but it's an ugly hack, and often when you're trying to do something like this you're not addressing a deeper architectural problem. [snip] -- real

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-31 Thread tedd
At 6:07 PM -0400 3/30/08, Daniel Convissor wrote: Hi Paul: On Sun, Mar 30, 2008 at 09:18:10PM +0100, PaulCheung wrote: The problem is I cannot transfer the Javascript variable needed in to PHP. JavaScript is client side. PHP is server side. This has been discussed on this list a couple ti

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-30 Thread Daniel Convissor
Hi Paul: On Sun, Mar 30, 2008 at 09:18:10PM +0100, PaulCheung wrote: > The problem is I cannot transfer the Javascript variable needed in to PHP. JavaScript is client side. PHP is server side. This has been discussed on this list a couple times, and on the web too many times to count. You ei

Re: [nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-30 Thread Tom Melendez
Hi Paul, Please slow down and provide us with some more information. 1. What is the problem? Meaning, what is the end result? Application doesn't work? Which parts? Explain the flow of the part that doesn't work 2. Sounds like you might be moving this application from somewhere else. What is

[nyphp-talk] Passing JAVASCRIPT variables to PHP

2008-03-30 Thread PaulCheung
HELP!! - The application uses PHP sessions and not cookies as well as a PHP Include to bring in a Javascript date routine, which is works fine. The problem is I cannot transfer the Javascript variable needed in to PHP. I have checked on the Net; But cannot find any solution that uses Includes