Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Multiple Toolbar Search Example
08/02/2009
16:18
Avatar
rong
Member
Members
Forum Posts: 3
Member Since:
09/02/2009
sp_UserOfflineSmall Offline

Hi,

I'm trying to run the Multiple Toolbar Search Example i've found in the demo (under New in version 3.3)

but with no luck. Can someone post an example of the html page (server side not needed) ?

Thanks,

Ron

09/02/2009
01:49
Avatar
rong
Member
Members
Forum Posts: 3
Member Since:
09/02/2009
sp_UserOfflineSmall Offline

Hi,

At first the page did not show up at all (I got a blank page). Now, when using the source code from the example (exactlly the same except for path changes for the js, css and gif files), the grid show with data but:

1. The search button is not shown.

2. The search bar is displayed only after I close and open the grid.

Can anyone help me with this? Does anyone has a working example he can share with me?

This is my code:

search.jsp

<%@page contentType="text/html; charset=utf-8" %>
<%@page language="java" import="java.util.*,java.sql.*,javax.naming.*,javax.sql.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>jqGrid Demo</title>
<link rel="stylesheet" type="text/css" media="screen" href="themes/basic/grid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="themes/jqModal.css" />
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.jqGrid.js" type="text/javascript"></script>
<script src="js/jqModal.js" type="text/javascript"></script>
<script src="js/jqDnR.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function(){
 
    jQuery("#s1list").jqGrid({
        url:'searchResult.jsp?q=1',
        datatype: "json",
        colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
        colModel:[
            {name:'id',index:'id', width:65},
            {name:'invdate',index:'invdate', width:90},
            {name:'name',index:'name', width:100},
            {name:'amount',index:'amount', width:80, align:"right"},
            {name:'tax',index:'tax', width:80, align:"right", edittype:'select', editoptions:{value:":All;0.00:0.00;12:12.00;20:20.00;40:40.00;60:60.00;120:120.00"}},
            {name:'total',index:'total', width:80,align:"right"},
            {name:'note',index:'note', width:150, sortable:false}
        ],
        rowNum:10,
        mtype: "POST",
        rowList:[10,20,30],
        imgpath: 'themes/basic/images',
        pager: jQuery('#s1pager'),
        sortname: 'id',
        viewrecords: true,
        toolbar : [true,"top"],
        sortorder: "desc",
        caption:"Multiple Toolbar Search Example"
    });
   
    jQuery("#t_s1list").height(25).hide().filterGrid("s1list",{gridModel:true,gridToolbar:true});
    jQuery("#sg_invdate").datepicker({dateFormat:"yy-mm-dd"});
   
    jQuery("#s1list").navGrid('#s1pager',{edit:false,add:false,del:false,search:false,refresh:false})
    .navButtonAdd("#s1pager",{caption:"Search",title:"Toggle Search",buttonimg:'themes/basic/images/find.gif',
        onClickButton:function(){
            if(jQuery("#t_s1list").css("display")=="none") {
                jQuery("#t_s1list").css("display","");
            } else {
                jQuery("#t_s1list").css("display","none");
            }
        }
    });
  
});
</script>
</head>
<body>
<table id="s1list" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="s1pager" class="scroll" style="text-align:center;"></div>

</body>
</html>

09/02/2009
10:26
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Do you have any js errors?

Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

19/02/2009
00:37
Avatar
rong
Member
Members
Forum Posts: 3
Member Since:
09/02/2009
sp_UserOfflineSmall Offline

Hi,

Can someone post a full working example of Multiple Toolbar Search or any other filtering/search example. I just can't make the demo example work with my jsp page.

Appriciate your help.

Thanks,

Ron

16/11/2010
12:02
Avatar
donatello
Member
Members
Forum Posts: 3
Member Since:
23/09/2010
sp_UserOfflineSmall Offline

Sorry to ressurect such an old thread but I am having the same problem with the "Multiple Toolbar Search" demo under the version 3.3 section.

The first issue is that the Search button does not show at all. What worries me is that a "searchl.js" javascript file is shown to be used and one doesn't know what this javascript file does or where to get it. Second problem is that a tag called "#t_s1list" is used in the example code but where is this tag defined? I presume that it is a <div> tag but declaring it makes no difference.

I have checked for Javascript errors but no errors are shown in Firebug. Any help will be greatly appreciated!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information