RE: [PHP] newbie - function is undefined

2011-04-04 Thread Jay Blanchard
[snip] JavaScript is a browser-side language, browsers have cache, cache sticks around, meaning that you can tell the browser to cache the JS file and not download it from the server (every time) if its being included on the browser end (which js is). All means faster page load times post initial

Re: [PHP] newbie - function is undefined

2011-04-04 Thread Richard Quadling
On 4 April 2011 12:12, Jay Blanchard jblanch...@pocket.com wrote: So all of the pages I generate with PHP that call JavaScript functions and libraries are doing it wrong? Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism

RE: [PHP] newbie - function is undefined

2011-04-04 Thread Jay Blanchard
[snip] Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism to hold the current state of PHP, eject the required JS code to get a value from the client and return it to the server which then recreates the working environment

RE: [PHP] newbie - function is undefined

2011-04-04 Thread Ashley Sheridan
On Mon, 2011-04-04 at 08:03 -0500, Jay Blanchard wrote: [snip] Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism to hold the current state of PHP, eject the required JS code to get a value from the client and return

Re: [PHP] newbie - function is undefined

2011-04-04 Thread Richard Quadling
On 4 April 2011 14:03, Jay Blanchard jblanch...@pocket.com wrote: [snip] Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism to hold the current state of PHP, eject the required JS code to get a value from the client and

Re: [PHP] newbie - function is undefined

2011-04-04 Thread Paul M Foster
On Mon, Apr 04, 2011 at 08:03:46AM -0500, Jay Blanchard wrote: [snip] Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism to hold the current state of PHP, eject the required JS code to get a value from the client and

RE: [PHP] newbie - function is undefined

2011-04-04 Thread Jay Blanchard
[snip] Oh no no no. You can use PHP to GENERATE JS, CSS, HTML, XML, etc. You just can't CALL JS from PHP and get a response.[/snip] Fair enough, I just wanted to make sure that we were all on the same page because some of the answers given to the OP may have been somewhat confusing. Many of you

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Micky Hulse
Maybe try: echo 'getText(p1)'; I think that should work. Good luck. Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Jim Giner
Thanks - now I see. the message means that it can't find a php function called getText. Doh! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Jim Giner
function. Try something like: ... echo 'heaading contains: scriptgetText(h2)/script'; ... I tried it - no better. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Richard S. Crawford
On Fri, Apr 1, 2011 at 2:32 PM, Jim Giner jim.gi...@albanyhandball.comwrote: function. Try something like: ... echo 'heaading contains: scriptgetText(h2)/script'; ... I tried it - no better. Did you still get the function undefined error? -- Sláinte, Richard S. Crawford

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Alex Nikitin
JavaScript is a browser-side language, browsers have cache, cache sticks around, meaning that you can tell the browser to cache the JS file and not download it from the server (every time) if its being included on the browser end (which js is). All means faster page load times post initial load,

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Jim Giner
And the way to do this is? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Stuart Dallas
On Friday, 1 April 2011 at 22:43, Alex Nikitin wrote: JavaScript is a browser-side language, browsers have cache, cache sticks around, meaning that you can tell the browser to cache the JS file and not download it from the server (every time) if its being included on the browser end (which js