X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Remove/hide 'If Javascript is disabled in your browser click (https://forum.x-cart.com/showthread.php?t=19283)

sandersdesign 01-16-2006 06:00 AM

Remove/hide 'If Javascript is disabled in your browser click
 
Hi, this question has possibly been asked before but has anyone found a way to hide or remove the 'If JavaScript is disabled in your browser click here' option. I guess there is a way to use a JavaScript detect script to switch the option on or off rather than placing text on the screen.

Thanks for any help.

balinor 01-16-2006 06:03 AM

I usually just remove that all together, but that is just me. Comment it out in auth.tpl.

Eddie Hillegers 06-23-2006 09:37 PM

I thought about commenting it out but that doesn,t get rid of the
no javascript messages in the productpages, that's where i tell them
how to switch on javascript. so just to be absolutely sure "if there is
somebody out there who switched of javascript" i did this
in auth.tpl and authbox.tpl


Code:

{if $usertype eq "C"}
<TR>
<TD class="VertMenuItems" colspan="2" align="right">

{if $js_enabled}
{else}

{$lng.txt_javascript_enabled}
{/if}
</TD>
</TR>
{/if}


that way it only shows up when javascript is switched off.

Cheers Eddie

carpeperdiem 07-27-2006 05:12 PM

Quote:

Originally Posted by Eddie Hillegers
I thought about commenting it out but that doesn,t get rid of the
no javascript messages in the productpages, that's where i tell them
how to switch on javascript. so just to be absolutely sure "if there is
somebody out there who switched of javascript" i did this
in auth.tpl and authbox.tpl


Code:

{if $usertype eq "C"}
<TR>
<TD class="VertMenuItems" colspan="2" align="right">

{if $js_enabled}
{else}

{$lng.txt_javascript_enabled}
{/if}
</TD>
</TR>
{/if}


that way it only shows up when javascript is switched off.

Cheers Eddie


WHY isn't this an automatic, "everyone must do this" mod?

Thanks a zillion for figuring this one out.

I use my wife as a test site... she doesn't know what javascript is, let alone if it is on or not on her iBook. I can assume that my customers barely know how to turn on their computer and I am grateful that they figured out how to get to my site. I will assume most everyone has js enabled, and for the few that don't, they know exactly what they're doing (and why they disabled it). "js off" is not a default on any brand name browser that I know of...

Once again, the geeks (er, programmers) decided that this warning needs to be visible to all... but the customers couldn't care less. So this little bit of code takes the clutter away from 99% of the customers, and it makes the site less "geeky".

Eddie, you ROCK!

Thanks,

Jeremy

William 10-05-2006 01:16 PM

Re: Remove/hide 'If Javascript is disabled in your browser click
 
Quote:

Originally Posted by Eddie Hillegers
that way it only shows up when javascript is switched off.


This bit of code does not detect if the users browser has JavaScript disabled.

All this does is pass a variable to tell x-cart.

Quote:

Originally Posted by carpeperdiem
WHY isn't this an automatic, "everyone must do this" mod?


If you want to let your visitors know that your shop requires JavaScript, then you need to use another method of letting the user know, i.e. <noscript>.


All times are GMT -8. The time now is 09:43 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.