Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Check if javascript enabled


Chris Dunning

Recommended Posts

Is it possible to write an if statement that checks to see if the browser has enabled javascript? Here's the psuedo-code for what I want to do:

if(javascript_enabled){
use the spiffy javascript menu
}else{
use the standard categories box
}

 

Thanks!

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Link to comment
Share on other sites

hrm...I think I figured it out:

 

<script type="text/javascript">

<!--

use spiffy javascript menu

//-->

</script>

<noscript>

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'categories.php');

}

?>

</noscript>

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Link to comment
Share on other sites

i dont think that has anything to do with wut u want but a simple searc of sum javascrip site will giv u some scripts

Checkout my osc contrib here!

You can also checkout the site im working on by clicking the card button!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...