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
access jqGrid data and functions in child window
08/04/2009
13:23
Avatar
pgtip
Member
Members
Forum Posts: 5
Member Since:
08/04/2009
sp_UserOfflineSmall Offline

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,

14/04/2009
02:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

02/05/2009
14:07
Avatar
pgtip
Member
Members
Forum Posts: 5
Member Since:
08/04/2009
sp_UserOfflineSmall Offline

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

05/05/2009
08:42
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

05/05/2009
18:01
Avatar
pgtip
Member
Members
Forum Posts: 5
Member Since:
08/04/2009
sp_UserOfflineSmall Offline

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,

Forum Timezone: Europe/Sofia

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.com

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information