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
Element is not a table
07/03/2011
21:38
Avatar
Reg
Calgary, Canada
Member
Members
Forum Posts: 92
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

I get this error — 'Element is not a table' — using Version 3.8.2 of jqGrid.

I have two tables on this page, both produced using my library for generating jqGrids (so all I pass are a number of parameters and the routine produces all the common code), but only one jqGrid fails this way.

I can't see the difference between these two tables, and I don't understand the error.

I have seen another thread related to this error but the answer didn't seem to relate: "TABLE" vs 'table' — if "table" is used in my code, it is generated the same for both jqGrids, but only one is failing. Has a fix to that problem been released or should I modify my version myself?

I get it whether I use IE 9 or FireFox 3.6.13

Any help on getting this fixed would be greatly apreciated

Thanks

Reg

07/03/2011
22:55
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Reg,

I suppose that your code generation for jqGrid has a bug where you either use <div> instead of <table> or use wrong id in the corresponding jQuery selector, so that use use jQuery(selector).jqGrid with the selector of some other elemets as the <table> which you generated. I recomend you to gebug the code with respect of Developer Tools of IE9 (F12). You should use uncompressed code of jqGrid from the "src" directory of the jqGrid download. See more information here.

Best regards
Oleg 

07/03/2011
23:55
Avatar
Reg
Calgary, Canada
Member
Members
Forum Posts: 92
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

Hi Oleg,

Thanks for your reply. In the processs of replying to you, to provide more information, I figured out the problem. I left all of my info here, in case anyone else has the same issue and can learn from my mistake. You don't need to do anything more for me on this issue.

Thanks,

Reg

IE9 debugger isn't telling me anything that I can see is helpful. There are no error messages (although I do see them when I make other mistakes, so it is not just that I am not using it correctly).

My html for the page includes two divs, one for each table: 

<div id="evalcomps"></div>

and

<div id="questionbank"></div>

When the page has loaded, I run scripts to populate these divs using ajax:

function LoadComponents() {

  $.ajax({

    url: "wc.dll?CMProcess~LoadContent~&amp;OnPage=T&amp;Target=Components&amp;sk=35Z0UP71206456&amp;sh=48&NoCache="+new Date().getTime(),

    dataType:"html",

    error: function (req,sttext) { alert(sttext+" : " +req) },

    success: function(req) { $("#evalcomps").html(req) }

  })

};

function LoadQuestionBank() {

  $.ajax({

    url: "wc.dll?CMProcess~LoadContent~&amp;OnPage=T&amp;Target=QuestionBank&amp;sk=35Z0UP71206456&amp;sh=48&NoCache="+new Date().getTime(),

    dataType:"html",

    error: function (req,sttext) { alert(sttext+" : " +req) },

    success: function(req) { $("#questionbank").html(req) }

  })

};

The first generates the error (Element is not a table) and does not display; the second works perfectly.

On the server, the called routines define the jqGrid and return html ... duh, and at this point I figured out what I was doing wrong.

The html returned by my routine for the jqGrid that did not work used the same name for the table it generates in code as the div names used on the page. A portion of my returned html looks like this:

<div align="center">

<div id="srcevalcomps"></div>

<div id="evalcompsTopMessage"></div>

<table id="evalcomps" class="jqGridTable"></table>

<div id="evalcompsPager" class="jqGridNavBar" style="text-align:right;"></div>

<div id="evalcompsMessage"></div>

</div>

<script type="text/javascript">

<!--

$("#evalcomps").jqGrid( {

url: 'wc.dll?CMProcess~AjaxGet~&amp;Data=EvalComps&amp;Key=&amp;sk=35Z0UP71206456&amp;sh=58',

Note that table id="evalcomps" matches div id="evalcomps"; once I changed this, the problem went away.

Thanks for listening,

Reg

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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