By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,964 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,964 IT Pros & Developers. It's quick & easy.

Modify a table in a parent window froma child

P: n/a
I'm having problems changing a table from a child window.

What works (but I really want to add more complex objects to teh cells
not just plain text)

var myTable = self.opener.document.getElementById("MY_TABLE");

var row = myTable.insertRow();
var cell = row.insertCell();
cell.innerText = "New value";

I've tried the two below methods but they both fail.

var myTable = self.opener.document.getElementById("MY_TABLE");
var row = myTable.insertRow();
var cell = row.insertCell();
cell.appendChild(self.opener.document.createTextNo de("New Value")); <--
Gives me an error of "Invalid arguement"

I've also tried

cell.appendChild(document.createTextNode("New Value")); <-- Gives an
error of "No such interface supported"

Any ideas?
Thanks
Eric

Feb 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Wescotte wrote:
I'm having problems changing a table from a child window.
[...]


HTMLTableRowElement object should/must be appended as children of
HTMLTableSectionElement objects, and the element objects have to be
created in the same DOM context they should be appended to.

`(window.)self' is as proprietary as `window' is and refers to the
same object.
HTH

PointedEars
Feb 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.