Forum


13:23

08/04/2009

Hello,
First of all jqGrid is a very nice plugin!
my jqGrid setup works without hitch. I have also put together functions that create a form based on column headers and exports the headers and data in tab/csv/excel format from the jqGrid....
I would like to move off this page the form that allows a user to select which columns they want to export to a popup window. The idea being that other pages that use jqGrid can just call this popup window.
I can access the parent table from the child popup with something like:
$(window.opener.document.getElementById('list')).attr('id')
and it displays the table id.
When I try to retrieve the data with a jqGrid function:
jQuery(window.opener.document.getElementById('list')).getDataIDs()
my firebug gives me ......getDataIDs is not a function.
[I have included the relevant javascript library declarations in the popup page.]
Again I don't believe this is a jqGrid error (as it works fine on 1 page scenario) but my use of javascript in general - just hoping someone may know a work around specific to jqGrid or the explanation why it is giving me this error message.
Closest message I saw to my question was the clone idea - not sure about that in this case.
I am trying to use the existing jqGrid data & functions to avoid querying the database a 2nd time for the same xml information and a duplicate jqGrid....
Thank you,
02:06

Moderators
30/10/2007

HEllo,
jQuery("#"+window.opener.document.getElementById('list')).getDataIDs();
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.
14:07

08/04/2009

Sorry for the late reply - thanks for the feedback (I got pulled off onto something else).
I am still getting the following error message:
[Exception... "'Syntax error, unrecognized expression: #[object HTMLTableElement]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
In the child window I do the following:
var storeArray = [];
storeArray = jQuery('#' + window.opener.document.getElementById('list')).getDataIDs();
and get the above error.
The error message seems to suggest the jqGrid list does not exist but it has already loaded on the main page.....
Thanks
08:42

Moderators
30/10/2007

Hello,
Forgot that window.opener.document.getElementById('list') return object and not string.
Try :
$(window.opener.document.getElementById('list')).getDataIDs()
instead.
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.
18:01

08/04/2009

Hi Tony,
Implementing your recommendation I now get the following:
$(window.opener.document.getElementById("list")).getDataIDs is not a function
[same js libraries included for when it is one window are included in the child window i.e. libraries should be in place]
At this point I will leave it in the main window and not create the child window (I am at a loss)
Thanks,
Most Users Ever Online: 715
Currently Online:
97 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66