HighDots Forums  

Re: objekt =?UTF-8?B?ZW50aMOkbHQga2VpbmUgRWlnZW5zY2hhZnRlbiAtIG9kZX Igc28gw6RobmxpY2g=?=

Javascript (German) Programmiersprache JavaScript. (de.comp.lang.javascript)


Discuss Re: objekt =?UTF-8?B?ZW50aMOkbHQga2VpbmUgRWlnZW5zY2hhZnRlbiAtIG9kZX Igc28gw6RobmxpY2g=?= in the Javascript (German) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: objekt =?UTF-8?B?ZW50aMOkbHQga2VpbmUgRWlnZW5zY2hhZnRlbiAtIG9kZX Igc28gw6RobmxpY2g=?= - 03-16-2006 , 04:24 PM






Oliver Block wrote:

Quote:
folgendes: Ein HTML-Document enthält eine Form und ein Textelement
(<input type="text" name="theo">). Dieses Dokument enthält auch
type="text" ist hier redundant.

Quote:
JavaScript-Code, der ein neues Fenster öffnet und u.a. ein JavaScript
in das geöfnete Fenster schreibt (document.write(...)).

Aus dem Skript im child-Fenster will ich eine Funktion im parent
aufrufen und benutze folgende Syntax:

top.myfunc(top.document.forms[0].theo)

Ich will die Funktion in Parent aufrufen, das auch Toplevel-Fenster
ist. Ich will dieser Funktion ein Element als Parameter übergeben,
daß sich ebenfalls im Parent befindet.

Wo liegt die Crux bzw. mein Fehler?
window.top verweist auf das oberste Window-Objekt der aktuellen
Fensterhierarchie. Du suchst

var o;
if (window && (o = window.opener) && !o.closed)
{
o.myfunc(o.document.forms[0].elements['theo']);
}

<URL:http://glasgoogle.de/>
<URL:http://dcljs.de/faq/>
news:dcljs.faq-pointer.2006-03-13 (AT) ID-3767 (DOT) user.individual.de


PointedEars


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.