Re: [PHP] 2 questions: Search in array and detect JS

2006-04-17 Thread Jochem Maas
1. I'm not the original poster (I wasn't asking a question) 2. don't post me or anyone else 'offlist' unless asked 3. WTF are you talking about? 4. if you say 'First' then that assumes there is a 'Second' coming. (that's sounds kinda funny given it was just Easter) suresh kumar wrote: First,

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-16 Thread Jochem Maas
don't know if someone mentioned it already but i was digging around in the docs for something completely different and bumped into this: preg_grep() [http://php.net/preg_grep] and I thought of your question, might be just what your looking for. I can't remember having come across this func

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Stut
Ryan A wrote: 1) Is it possible to detect JavaScript via php... and yes I do know that JS is client side while PHP is server...but how else to do it? The reason I ask is before serving an AJAX page I would like to make sure JS is enabled, if not, serve the other normal page... I am sure I am not

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Ryan A
Hey Stut, Thanks for replying. --- The way I do this is to serve the 'notmal page' first, but with the following snippet of JS in it... script language=javascript !-- location.href = '/url/for/ajax/page.php'; -- /script--Makes sense and pretty easy,

RE: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Chrome
: [PHP] 2 questions: Search in array and detect JS Hey Stut, Thanks for replying. --- The way I do this is to serve the 'notmal page' first, but with the following snippet of JS in it... script language=javascript !-- location.href = '/url/for/ajax/page.php'; -- /script

RE: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread tedd
Something to consider might be: noscript Sorry! This page requires Javascript to function properly! Please enable it or get a decent browser /noscript !-- Normal page functions -- I haven't tested it so there is a chance it's fiction :) Of course, if web standards aren't a concern it makes no

RE: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Chrome
--- http://chrome.me.uk -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: 15 April 2006 15:10 To: Chrome; 'Ryan A'; 'php' Cc: 'Stut' Subject: RE: [PHP] 2 questions: Search in array and detect JS Something to consider might be: noscript Sorry! This page requires

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread cajbecu
that would work but does it give the desired effect? Dan --- http://chrome.me.uk -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: 15 April 2006 15:10 To: Chrome; 'Ryan A'; 'php' Cc: 'Stut' Subject: RE: [PHP] 2 questions: Search in array and detect

RE: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Chrome
: [PHP] 2 questions: Search in array and detect JS In your script, $js will be false false! Chrome wrote: How about ?php $js = true; ? noscript ?php $js = false; ? /noscript ?php if ($js) { // whizzy Ajax code (or file include) } else { // generic warning

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread fabien champel
js is client-side, php server side... it can't work fabien Chrome wrote: How about ?php $js = true; ? noscript ?php $js = false; ? /noscript ?php if ($js) { // whizzy Ajax code (or file include) } else { // generic warning (or include non-JS base

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread fabien champel
for js detection, you can use that in a previous page : script type=text/javascript document.write('a href=ajax-page.htmlpage/a'); /script noscripta href=simple-page.htmlpage/a/noscript it is simple, and work fine. no need to have cookies enable -- PHP General Mailing List

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Ryan A
Hey, Thanks for replying. for js detection, you can use that in a previous page : script type=text/javascript document.write('a href=ajax-page.htmlpage/a'); /script noscripta href=simple-page.htmlpage/a/noscript it is simple, and work fine. no need to have

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread John Wells
On 4/14/06, Ryan A [EMAIL PROTECTED] wrote: The reason I ask is before serving an AJAX page I would like to make sure JS is enabled, if not, serve the other normal page... I am sure I am not the first person to come accross this little problem, how did you solve it? Dan eluded to a big problem

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-14 Thread tedd
Ryan: First question. Technically no, you can't detect js from php. However, I read where one can detect if a user has cookies on by sending a cookie and then reading it back. And considering that you can send a cookie via js, you could do that. However, that would mean that the user had to

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-14 Thread Robert Cummings
On Fri, 2006-04-14 at 13:34, tedd wrote: Ryan: First question. Technically no, you can't detect js from php. However, I read where one can detect if a user has cookies on by sending a cookie and then reading it back. And considering that you can send a cookie via js, you could do that.

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-14 Thread Ryan A
Hey Tedd / Robert, Thanks for replying. -- Tedd: However, I read where one can detect if a user has cookies on by sending a cookie and then reading it back. And considering that you can send a cookie via js, you could do that. However, that would mean that the user had to