(somewhat solved): keyboard controls don't work for me

Apr 16, 2009 at 11:53 PM
I'm having a hard time getting the keyboard controls to work.

Everything else appears to be working - my data is being properly returned, it's finding matches based on what I type, all mouse controls work.

Using keyboard arrows, hitting enter, hitting tab ... none of these things have any effect.

Am I missing some dependency? I'm including jQuery, jquery.flexbox.css, jquery.flexbox.js.

Maybe I need to activate some option? Here's my initialization call ...

<script type="text/javascript">
    jQuery().ready(function() {  
        jQuery('#fb').flexbox('/test/jsonResults.php');
    });  
</script>

Help!
Apr 17, 2009 at 12:15 AM
By the way, keyboard controls work fine for me on the example pages, such as the teaser demo  on:
http://www.fairwaytech.com/flexbox/

Here's the page source on which it's not working:

     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     3 <head>
     4  <title>
     5     Website Administration - Site Administration
     6  </title>
     7  <link rel="stylesheet" type="text/css" href="/.stylesheets/.jquery-plugins/jquery.flexbox.css" media="screen" />
     8  <script type="text/javascript" src="http://www.google.com/jsapi?key=[my key #]"></script>
     9  <script type="text/javascript">
    10     google.load("jquery", "1");
    11  </script>
    12  <script type="text/javascript" src="/.clientsideScripts/.jquery-plugins/jquery.flexbox.js"></script>
    13 </head>
    14 <body>
    15 <div>
    16 <script type="text/javascript">
    17     jQuery().ready(function() {  
    18         jQuery('#fb').flexbox(
    19             '/test/jsonResults.php'
    20         );
    21     });  
    22 </script>
    23 </div>
    24 <div id="fb"></div>
    25 </body>
    26 </html>

Apr 17, 2009 at 12:29 AM
Kind of solved, but maybe brings a new problem to light ...

The problem was the copy of flexbox I was using. To avoid conflicting with other js frameworks, I generally convert all references to jQuery from the abbreviated '$' to the full 'jQuery'. Doing a replace all on the flexbox script made something break that only seems to affect keyboard controls.

I'm going to try to figure out what, but I'm not very good with js code ... if anyone has a clue what it could be, feel free to point me in the right direction.

Thanks