[Cialug] ajax testing for javascript

Gavin Campbell gcampbell at internetsolver.com
Mon Jan 28 13:25:40 CST 2013


I had a failed message earlier.  On my site ive been testing ajax as of late.
I replaced my front end registration piece with an ajax component.
www.superfit.me

feel free to swipe the .js file and form html.
Basically for me, if JS isn't an option it doesn't matter, the form will process to php and return them to the site after the registration process completes.  My ajax warning messages are coming from php.  Try registering with a username and no password for reference.

-----Original Message-----
From: cialug-bounces at cialug.org [mailto:cialug-bounces at cialug.org] On Behalf Of Scott Yates
Sent: Monday, January 28, 2013 1:19 PM
To: Central Iowa Linux Users Group
Subject: Re: [Cialug] ajax testing for javascript

Am i right in thinking you want to know on the SERVER side if the browser has JS enabled?

You could try using JS to set a cookie, and then test for that cookie using server-side scripting on the next page view.



On Mon, Jan 28, 2013 at 1:02 PM, Barry Von Ahsen <barry at vonahsen.com> wrote:

> could you getElementById on something you know should exist (header 
> image, logo, etc)?
>
> or document.body.getChildren().length > 0? (that syntax is probably 
> wrong)
>
> -barry
>
>
>
> On Jan 28, 2013, at 9:43 AM, Dave Hala Jr wrote:
>
> > I'm looking for a simple way to test if a browser has Javascript 
> > enabled.  Here's what I come up with.  I embedded in the head 
> > statement in my html. Can anyone see any problem with using this?
> >
> > <noscript>
> > <meta HTTP-EQUIV="REFRESH" content="0; url=<?php 
> > $_SERVER['SERVER_NAME']?>/main/error.php?err=xx">
> > </noscript>
> >
> >
> > :) Dave
> >
> >
> >
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > http://cialug.org/mailman/listinfo/cialug
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug


More information about the Cialug mailing list