Hi Danny and all others,
thanks for your email.
I tried your suggestion and now I have the following problem:
I have three frames:
---------------------------------------
| Frame1 |
---------------------------------------
| Frame2 | Frame3 |
---------------------------------------
Frame1 includes one JavaScript which looks every 10 sec. for new content in
the TextArea-component in a form in Frame2.
Frame2 includes one TextArea component.
Frame3 is my dynamic page and will be refreshed by my servlet. This page
includes one JavaScript with a variable like (message="Hello I'm from
Servlet..") and this string must be written into the TextArea component of
Frame2. It only works when Frame3 is static and loaded by Browser together
with Frame1 and Frame2. But when I try to load Frame3 using a dummy button
which runs my servlet the JavaScript in Frame3 is not able to access the
TextArea withhin Frame2 :-((
On the other hand is Frame3 no more accessible frome Frame1 or 2 after it
was generated by servlet!
frame3 includes:
...
<SCRIPT LANGUAGE="JavaScript">
...
function letsGo(){
msgs = "Hello I'm from servlet..."
parent.Frame2.document.FormA.TextArea1.value = msgs;
}
...
Is there a way to get the content of a dynamic frame from other frames using
JavaScript?
Thanks again for the responses,
H. Peivareh
>Hi,
>
>The way I manage the do this, is to work with scripting (Javascript) in
each document in each frame : every time a
>timer expires a request for an update is made. There are issues if you are
concerned with synchronizing the content in
>each frame.
>In that case you can work with a dummy frame (one with very small
dimensions), which contains the timer code, and
>which changes the document URL for all the other frames involved. This way
of working requires the loading time of the
>frames to be shorter than the timer delay, otherwise it looks like there's
something wrong with your browser :) If you
>can not be sure your timer delay is sufficient (let's face you just can't
with the web), collect all the onLoad events
>for each frame before you retrigger the timer.
>
>You can work with a single servlet if you use additional parameters to
identify the frame, or by some webserver tricks
>where you map different names on the same servlet and then recover the
referer. But I'm not sure about that last bit
>:) Seems a bit complicated...
>
>Danny Martens
>
>Hossein Peivareh wrote:
>
>> Hello there.
>>
>> Does anybody know if it is possible to send various contents to
approperiate HTML-frames?
>>
>> I have a thread in my servlet and every 10 sec. I must send the content 1
to frame 1 and the content 2 to frame 2.
>>
>> Is there a HTML-tag where I can define the target frame name or ...?
>>
>> Any information, examples, or references would be much appreciated.
>>
>> Thanks.
>>
>> HoPe
>>
>> [EMAIL PROTECTED]
>>
>>
___________________________________________________________________________
>> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
>> of the message "signoff SERVLET-INTEREST".
>>
>> Archives: http://archives.java.sun.com/archives/servlet-interest.html
>> Resources: http://java.sun.com/products/servlet/external-resources.html
>> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html