homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Javascript sniffer/detection redirect?
How to accomodate those JS holdouts...

 8:11 pm on Jul 5, 2001 (gmt 0)

I just discovered an obscure (as in, will rarely be a problem) but significant (as in, will be a major catastrophe on those few occasions) glitch in my shopping cart layout that requires me to switch the ordering pages to a javascript-submit format...

However, considering the old submit button layout works fine for almost all orders, and there are still ~5-10% of netizens who either stubbornly turn off javascript ;) or use stupendously old browsers, I figured I may as well keep the old ordering templates around for them...

What I need now is a quick javascript detection script to stick in the <head>s of the new pages, which will send non-js capable users to the old pages, while allowing the other 90+% of us to proceeed seamlessly to the new ones.

A javascript javascript sniffer, if you will. The smaller the sniffer the better, of course....



 8:25 pm on Jul 5, 2001 (gmt 0)

>will send non-js capable users to the old pages

How about a redirect in the noscripts section of the new pages?


 8:42 pm on Jul 5, 2001 (gmt 0)

Suddenly, I feel a bit dim... how would that work?

Err... Come to think of it, I guess a javascript redirect script in the <head> of the page wouldn't exactly tell a non-js browser to leave, would it? :o

.oO(we need an icon showing a flickering, sad, old lightbulb for days like this...)


 7:50 am on Jul 6, 2001 (gmt 0)

Wouldn't it be simplest to keep the old pages in place, and put a js redirect on the top of them to the new js forms? Only js enabled visitors would execute the redirect, and they would go to the js pages, where you want them.


 2:09 pm on Jul 6, 2001 (gmt 0)

>Wouldn't it be simplest to keep the old pages in place, and put a js redirect on the top of

Simpler, yes, but what's the status of a js redirect re spiders? Since we're talking approx. 5% of the traffic, I was thinking it would be more conservative from an SEO perspective to keep the new pages as primary with the old as secondary using a manual "Our js-free cart is here [click]" in <noscript>. Basically, I guess I just don't like redirecting 95% of the traffic and keeping 5% on the straight path.


 11:22 pm on Jul 6, 2001 (gmt 0)

:) Figured out how to fix the poroblem without resorting to javascript at all. Although nifty custom submit button graphics were looking awfully nice... But all in all, leaving it accessible to all, ugly buttons or not, seems the best bet..


 11:38 pm on Jul 6, 2001 (gmt 0)

I am curious , what were you doing with the submit button that would not let you use <nifty custom submit button graphics>. I have read this thread several times and it sound like an interesting challenge I am just not sure what it is your tring to do.


 11:53 pm on Jul 6, 2001 (gmt 0)

Originally, I thought I'd found a glitch with my shopping cart software that required the use of javascript form submission, rather than regular submit buttons... so I was originally just trying to get my shopping cart to work properly. (There was a problem causing everything to dissappear from the shopping cart if the user tried to change the quantity of a single item in the cart...)

The main hassles with the custom submit buttons are:

  • AFAIK, they require javascript, meaning surfers with javascript disabled by choice would not be able to use the shopping cart...
    (if anyone knows different, please let me know! :) )

  • Javascript form submit code varies between IE and Netscape (big suprise), requiring the use of a browser sniffer in addition to the javascript sniffer...

    All in all, I'm looking for the most hassle-free configuration for the shopping cart I can find, and avoiding javascript entirely sounds like it's definitely the easy way out (now that I've got the original glitch solved).

  • David

     5:35 pm on Jul 7, 2001 (gmt 0)

    Thanks for responding, I have just done the same thing with my shopping cart(got rid of all the JS) and was getting ready to see if I could spice it up for the JS enabled. It seems like there should be a way. If I figure something out I will post back.


     3:01 am on Jul 8, 2001 (gmt 0)

    Cool! I'm always interested in (functional) enhancements to our site... Right now, I'm looking at doing a "decision tree" function that would help people choose which of our products would best suit their particular needs. The current plan doesn't require javascript, but could probably be a bit nicer looking and easier to maintain if some kind of backend script handled the process.

    Global Options:
     top home search open messages active posts  

    Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
    rss feed

    All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
    Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
    WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
    © Webmaster World 1996-2014 all rights reserved