Forum

November 2nd, 2014
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
Generate HTML jqGrid using perl..
22/07/2008
23:56
Avatar
LaMalice
Member
Members
Forum Posts: 5
Member Since:
23/07/2008
sp_UserOfflineSmall Offline

Hi!

I have a problem where I would like to find the solution. I wrote a simple perl script to generate HTML code to show a grid as shown in the instructions but I get and error  'Object does'nt support this property or method'.

But when I am saving the generate code to an HTML file at the root an excecute the file. It work find!

Can someone help me on this problem? Thanks!

Here is my PERL code

#!/usr/local/bin/perl

print qq~
<html>
<title>test</title>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="myRoot/js/themes/sand/grid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="myRoot/js/themes/jqModal.css" />
<script src="myRoot/js/jquery.js" type="text/javascript"></script>
<script src="myRoot/js/jquery.jqGrid.js" type="text/javascript"></script>
<script src="myRoot/js/js/jquery.jqModal.js" type="text/javascript"></script>
<script src="myRoot/js/js/jquery.jqDnR.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function()
    {
    jQuery("#list").jqGrid(
        {
        url:'myRoot/js/queryScript.php',
        datatype: 'xml',
        mtype: 'GET',
        colNames:['','','Date','Titre','Rabais',''],
        colModel :[
        {name:'icon', index:'icon', width:50,resizable:false},
        {name:'jour', index:'jour', width:60,resizable:false, sortable:true},
        {name:'date', index:'date', width:100,resizable:false, sortable:false},
        {name:'titre', index:'titre', width:250, align:'left',resizable:false},
        {name:'rabais', index:'rabais', width:100, align:'left',resizable:false},
        {name:'dum', index:'dum', width:10, align:'left',resizable:false}
         ],
        pager: jQuery('#pager'),
        rowNum:10,
        rowList:[20,30],
        viewrecords: true,
        imgpath: 'myRoot/js/themes/sand/images',
        height : '310',
        width:545,
        hiddengrid: true,
        caption: 'test' });
       
        });
   
   
    </script>
</head>
<body>   
    <tr><TD VALIGN="TOP" width=100%>
   
    <table cellpadding=8 cellspacing=0>
            <tr>
                <td width=400>&nbsp;</td>
                <td>
                <table id="list" class="scroll" style=""></table>
                <div id="pager" class="scroll" style="text-align:center;"></div>
                </td>
            </tr>           
        </table>

</body></html>

~;

23/07/2008
06:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Is this only in IE?

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.

23/07/2008
07:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Also could you please replace

<script src=”myRoot/js/jquery.jqGrid.js” type=”text/javascript”></script>

with

<script src=”myRoot/js/grid.base.js” type=”text/javascript”></script>

and test

Thank you

Regards

Tony

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.

23/07/2008
13:35
Avatar
LaMalice
Member
Members
Forum Posts: 5
Member Since:
23/07/2008
sp_UserOfflineSmall Offline

Hi Tony!

I don't have the file ''grid.base.js''. Where can I get it?

Also, the HTML page using the same code work fine with jquery.jqGrid.js

file. Is that possible that it is not possible to call PHP query using a perl

script? That should be wrong because it is js who is calling the php query, not perl. Am I right?

Thanks!

24/07/2008
02:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

If you have downloaded the package, there is a directory js in wich this

file is present. I think that this is a path problem. I generate such

pages in PHP with success and there is no problem.

Please when you generate the script check the paths

Regards

Tony

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.

24/07/2008
08:11
Avatar
LaMalice
Member
Members
Forum Posts: 5
Member Since:
23/07/2008
sp_UserOfflineSmall Offline

A big thanks Tony!! It work with grid.base.js!

BUT...  I have lost a lot the nice functionnalities of jquery.jqGrid.js ;-(!

I suppose that grid.base.js was a previous version?

Do you know what is the problem to use jquery.jqGrid.js in a perl script (cgi-bin) and why it does'nt have any problem in an HTML file?

Anyway, again... thanks a lot!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
49 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