[studentbooks09] r155 committed - updated javascript to be sure user types in a valid query

1 view
Skip to first unread message

student...@googlecode.com

unread,
Dec 14, 2010, 2:03:16 AM12/14/10
to student...@googlegroups.com
Revision: 155
Author: mrjoedowns
Date: Mon Dec 13 23:02:14 2010
Log: updated javascript to be sure user types in a valid query
http://code.google.com/p/studentbooks09/source/detail?r=155

Modified:
/trunk/Geekzbookshelf2/index.php

=======================================
--- /trunk/Geekzbookshelf2/index.php Sat Dec 11 01:00:03 2010
+++ /trunk/Geekzbookshelf2/index.php Mon Dec 13 23:02:14 2010
@@ -211,6 +211,11 @@
}
//updates the middle div to display the results of the search
function dosearch(form) {
+ var sBox = document.searchForm.searchBox.value;
+ if(sBox == "Enter Book title/author/ISBN" || sBox.length <
3){
+ alert("your query must be greater than two letters in
length");
+ return false;
+ }
//alert("in do search");
new Ajax.Updater( 'middle', 'center/search.php', {
method: 'get',
parameters: $(form).serialize() } );

Reply all
Reply to author
Forward
0 new messages