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 befo

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 p

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 : document.write('page'); page it is simple, and work fine. no need to have cookies enable-Nice, most of the methods disc

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 : document.write('page'); page it is simple, and work fine. no need to have cookies enable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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 > > > > > > > > if ($js) { > // whizzy Ajax code (or file include) > } else { > // generic warning (or include non-JS base file) > } > ?> > > I know that would work bu

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

2006-04-15 Thread Chrome
hp'; '"Stut"' Subject: Re: [PHP] 2 questions: Search in array and detect JS In your script, $js will be false false! Chrome wrote: > How about > > > > > > > > if ($js) { > // whizzy Ajax code (or file include) > } e

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

2006-04-15 Thread cajbecu
I know 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'; '

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

2006-04-15 Thread Chrome
ot;Stut"' Subject: RE: [PHP] 2 questions: Search in array and detect JS >Something to consider might be: > > >Sorry! This page requires Javascript to function properly! Please enable it >or get a decent browser > > > > >I haven't tested it so there is a chance

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

2006-04-15 Thread tedd
Something to consider might be: Sorry! This page requires Javascript to function properly! Please enable it or get a decent browser 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 difference Dan It works and if you want i

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

2006-04-15 Thread Chrome
tion :) Of course, if web standards aren't a concern it makes no difference HTH Dan --- http://chrome.me.uk -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: 15 April 2006 14:26 To: php Cc: "Stut" Subject: Re: [PHP] 2 questions: Search in

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... --Makes sense and pretty easy, this was suggested a while back, si

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 no

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 have

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

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 h

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

2006-04-14 Thread Ryan A
Hi, Like the subject says; I have two questions: 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