You have control over both documents, right? Does the opener document
have Prototype in it? Another tack you might try is to have declared a
function in the global namespace of the opener document that does what
you need it to. Then you can call that without needing to follow a
chain of extensions quite so perfectly (and fragile-ly).
// in foo.html, which opens bar.html
// include prototype.js first
var baz = function(){
$('wieder_komp_1').insert( ... );
}
// in bar.html
top.opener.window.baz();
Walter
On Mar 1, 2010, at 12:27 AM, ferengi wrote:
Moin..
now test this :
$
(top
.opener
.document
.getElementById('wieder_komp_1')).insert({'bottom':'<tr><td>moep</
td></tr>'});
but i get an Error
TypeError: $(top.opener.document.getElementById("wieder_komp_1")) is
null { message="$(top.opener.document.g...ieder_komp_1")) is null",
more...}
On Feb 26, 8:21 pm, Walter Lee Davis <[email protected]> wrote:
Aha, I think you might need to combine both of those. Since you're
calling opener in there, you're reaching out of the current document
to another document that might not already have extended elements.
You
might need to try this:
$(top.opener.document.getElementById('body_weider_komp_1')) ...
before you will actually /have/ insert() to work with. Especially on
IE, you can't count on elements being extended until you access them
through $ or $$ or another Prototype "getter" like select().
Walter
On Feb 26, 2010, at 2:08 PM, Dr. Underhook wrote:
try it without the single quotes around bottom
ie:
top
.opener
.document
.getElementById('body_wieder_komp_1').insert({bottom:wieder_row});
and to really clean it up:
$('body_wieder_komp_1').insert({bottom: wieder_row});
should do it
On Feb 26, 2:13 am, ferengi <[email protected]> wrote:
hi...
i insert a tbody and give him a id..look here
<table id="wieder_komp_1" class='fixed cellg1' style="margin-top:
1px"
cellspacing="1" cellpadding="0">
<tbody id="body_wieder_komp_1">
<tr class="cellg3 f10">
<td class="center cellg1" width="20px"> </td>
<td class="center" width="170px">SAP-Typ</td>
<td class="center" width="70px">Material-Nr</td>
<td class="center" width="70px">PA</td>
<td class="center" width="650px">von - bis</td>
<td class="center cellg1" width="20px"> </td>
</tr>
......
an change the script to
wieder_row ='<tr id="wieder['+c+']" style=""><td class="center"
colspan="4">test</td></tr>';
top
.opener
.document
.getElementById
('body_wieder_komp_1').insert({'bottom':wieder_row});
same error .....
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
.
To unsubscribe from this group, send email to
[email protected]
.
For more options, visit this group
athttp://groups.google.com/group/prototype-scriptaculous?hl=en
.
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
.
To unsubscribe from this group, send email to [email protected]
.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en
.
--
You received this message because you are subscribed to the Google Groups "Prototype
& script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.