Permalink
Browse files

issue an error message if the browser doesn't have JavaScript

SS requires JavaScript to be present.  If the user wants to use web-blast on a
non-JS browser, I am sure there are other alternatives out there.  If someone
wants to send a pull request to make SS work again on a non-JS browser, I am
keen to discuss the options.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
  • Loading branch information...
1 parent eb46587 commit 5cd0a6f7faab7ed0c14393df25143ec06b7ba9ae @yeban yeban committed May 19, 2012
Showing with 17 additions and 0 deletions.
  1. +7 −0 public/css/custom.css
  2. +2 −0 public/js/sequenceserver.js
  3. +8 −0 views/search.erb
View
@@ -6,6 +6,13 @@ pre {
font-family: Monospace;
}
+.nojs-error {
+ margin-top: 10px;
+ padding: 10px;
+ color: white;
+ background-color: red;
+}
+
.offset-left {
margin-left: 20px;
}
@@ -113,6 +113,8 @@ if (!SS) {
}()); //end SS module
$(document).ready(function(){
+ $('.nojs-error').remove();
+
// poll the sequence textbox for a change in user input
$('#sequence').poll();
View
@@ -29,6 +29,14 @@
<body>
<div class="container">
+ <div class="nojs-error">
+ <h3>SequenceServer can't work without JavaScript.</h3>
+ <ul>
+ <li>Please see if you can enable JavaScript in your browser's preferences.</li>
+ <li>If your browser doesn't support JavaScript, please consider upgrading to the latest version or using Firefox or Chrome.</li>
+ </ul>
+ </div>
+
<div class="page">
<div class="page-header" id="banner">
<h1>BLAST Sequence(s)</h1>

0 comments on commit 5cd0a6f

Please sign in to comment.