I installed the module and made the Advanced version with Views and CCK working quite easily. Thanks much for this great module.

However, there is one fundamental question:

When the javascript of the browser is turned off, the block totally disappears.
I have seen some similar sites with this functionality, where these sites gracefully degrade to clickable buttons that refer to nodes.

Is there any way to add such greaceful recovery for javascript off cases ?
Or if it is available, can I be forwarded to this information.

Thanks again for the great module.

Comments

Matt Walker’s picture

Version: 6.x-1.0-rc6 » 6.x-1.0-rc5

I am wondering the same thing ... I've gone through the advanced tutorial and have everything working and looking good with custom CSS. However, I am concerned about visitors that don't have javascript enabled. Especially because the pagers still show up, but the slide div completely disappears.

I guess I could hack the preprocess to check for javascript, but if there is a nicer way to do this, or if someone has already thought of a solution, that information would be greatly appreciated. (Admittedly I am not much of a programmer)

Still, though, I'm really happy with this module and the documentation/tutorial.

ppblaauw’s picture

Version: 6.x-1.0-rc5 » 6.x-1.0-rc6
Status: Active » Postponed

Thanks both for reporting.

There is no graceful degrading when Javascript is not enabled.

We will try to implement graceful degrading in a future version of the module.

Any help with this appreciated.

I put the version of the issue back to RC6

Matt Walker’s picture

This certainly is not "graceful degradation", but I hacked the template a bit so if a user doesn't have JS enabled, it will simply show a static image.

I used this bit of code here: http://www.inspirationbit.com/php-js-detection-of-javascript-browser-set... as a JS check

Basically just did this at the top:

<?php 
if (isset($_POST['jstest'])) {
  $nojs = 0;
  } else {
  echo '<form name="jsform" id="jsform" method="post" style="display:none">';
  echo '<input name="jstest" type="text" value="true" />';
  echo '<script language="javascript">';
  echo 'document.jsform.submit();';
  echo '</script>';
  echo '</form>';
  $nojs = 1;
}
if ($nojs = 1) { 

echo '<img src="../images/nojs.jpg"/>'; 
} else { 

// template code

<?php }  ?>

This at least gives me SOMETHING to show users without JS, instead of a list of pagers that don't do anything when you click them next to a big empty box. :)

Thanks, ppblaauw, for a great module! When I get the site finished I will send you a link.

priceline’s picture

Thanks for sharing the solution. Can you provide detail information on where to put the code? I am using Advanced UpRight40 template.

Do I have to have any references to Javascript functions? Thank you,

dgautsch’s picture

I think you should insert in your ddblock-cycle-block-content-upright40.tpl.php file. not the pager file. Notice he has a comment there that denotes the rest of the template code gpes after his custom code.

Is there a timeline in place for this graceful backward degradation?

ppblaauw’s picture

No, there is no time line at the moment for graceful backward degradation.
Adding AJAX support and TABS for pager items now.

Help appreciated with graceful backward degradation.
Even a writeup of possible solutions would help.

cristian.stoica’s picture

subscribing

RobbM’s picture

Title: The Functionality When Javascript is Turned Off » Comparison, not assignment

Thanks for this useful snippet. But pretty sure the code needs to be:

...
if ($nojs == 1) {
...
RobbM’s picture

Title: Comparison, not assignment » The Functionality When Javascript is Turned Off

Doh! Didn't mean to change the title.