Oud 29-04-2003, 07:47
Kermit the frog
Avatar van Kermit the frog
Kermit the frog is offline
Weet iemand hoe je form elementen kunt bereiken via een document in een ander frame. Stel ik heb een frameset van 2 rijen, en in frame 1 is een form "submitForm" met een textarea "text". Nu wil ik dus vanuit het document in frame 2 dit element aanroepen.
__________________
I give you the finger
Met citaat reageren
Advertentie
Oud 29-04-2003, 11:10
-niels-
Avatar van -niels-
-niels- is offline
<form action="pagina.htm" method="post" target="cart">

target is de naam van je frame...
__________________
If you dont like oral sex, keep your mouth shut... I'll spray my love all over your face.... ->PAS OP IK HIJACK JE NICK<- • Mr. Mysteria •
Met citaat reageren
Oud 29-04-2003, 11:16
Verwijderd
Citaat:
-niels- schreef op 29-04-2003 @ 12:10:
<form action="pagina.htm" method="post" target="cart">

target is de naam van je frame...
Volgens mij bedoeld ie dat niet..
Met citaat reageren
Oud 29-04-2003, 14:54
Kermit the frog
Avatar van Kermit the frog
Kermit the frog is offline
Dat bedoelde ik idd niet helemaal. Mijn uitleg klopte ook niet. Ik bedoelde eigenlijk een document met daarin een IFRAME. Vanuit het IFRAME moet de elementen in het "parent" document beschikbaar worden...
__________________
I give you the finger
Met citaat reageren
Oud 29-04-2003, 15:04
Verwijderd
Ikw eet wel hoe je naar een parent frame naar ene form kan schrijven, maar niet hoe je iets op moet vragen..
Met citaat reageren
Oud 30-04-2003, 08:03
iamcj
Avatar van iamcj
iamcj is offline
window.frames['framename'].document.forms[0].textarea.value???
__________________
Wie bang is voor morgen, kan niet genieten van vandaag.
Met citaat reageren
Oud 30-04-2003, 09:44
deathz0rz
deathz0rz is offline
ik heb ergens gelezen dat je maar beperkt elementen in een ander frame kan aanroepen, of dat nou het moeder- of childframe is boeit niet

edit:

frames

---------------------------------------------

Description

Retrieves a collection of all window objects defined by the given document or defined by the document associated with the given window.

Syntax
object.frames(index)

Parameter Description
object Either the document or window object.
(index) Optional. An integer or a string specifying the index value of the window to retrieve. Integer indexes are zero-based, meaning the first window in the collection has index 0. A string index is valid only if the string is the name of one window in the document.


Remarks

If the HTML source document contains a BODY tag, the collection contains one window for each IFRAME element in the document. If the source document contains FRAMESET tags, the collection contains one window for each FRAME tag in the document. In both cases, the order is determined by the HTML source.

This collection contains window objects only and does not provide access to the corresponding FRAME and IFRAME elements. To access these elements, use the all collection for the document containing the elements.

Although you can use names with the item method on this collection, the method never returns a collection. Instead, it always returns the first window having the given name. To ensure that all windows are accessible, you should always make sure that no two windows in a document have the same name.
__________________
Ooit. Dan.

Laatst gewijzigd op 30-04-2003 om 09:58.
Met citaat reageren
Oud 01-05-2003, 08:47
Kermit the frog
Avatar van Kermit the frog
Kermit the frog is offline
Citaat:
iamcj schreef op 30-04-2003 @ 09:03:
window.frames['framename'].document.forms[0].textarea.value???
Ja, die wist ik al. Maar dat gaat alleen op voor de elementen in het IFRAME. Je kunt het niet andersom doen want het 'parent' window heeft immers geen ID of NAME tag.
Nu heb ik wel een property kunnen vinden op MSDN maar deze werkt alleen op IE 6+ (document.parentWindow red.).
De truc is om vanuit een child object (IFRAME in dit geval) het 'parent' object als variabele te initialiseren. Ik kom er in iedergeval niet uit.
__________________
I give you the finger
Met citaat reageren
Oud 01-05-2003, 09:28
Kermit the frog
Avatar van Kermit the frog
Kermit the frog is offline
Laat maar. Ik heb het al gevonden, en het was bijna te simpel voor woorden

parent.[ functie ]

of

top.[ functie ]

...zo makkelijk zul je ze bijna niet meer krijgen
__________________
I give you the finger

Laatst gewijzigd op 01-05-2003 om 09:31.
Met citaat reageren
Advertentie
Reageren

Topictools Zoek in deze topic
Zoek in deze topic:

Geavanceerd zoeken

Regels voor berichten
Je mag geen nieuwe topics starten
Je mag niet reageren op berichten
Je mag geen bijlagen versturen
Je mag niet je berichten bewerken

BB code is Aan
Smileys zijn Aan
[IMG]-code is Aan
HTML-code is Uit

Spring naar


Alle tijden zijn GMT +1. Het is nu 11:19.