ark312 wrote:
I try to update several frames in one mouseclick. There is an error in the
code below, that is for sure. The Text-frame doesn't get updated. What do
I do wrong?
[...]
<a href="Mirte.htm"
target="Info"
onclick="if (parent.frames.Play) {
parent.frames.Play.location.href = 'PlayMirte.htm';
}
and
if (parent.frames.Text) {
parent.frames.Text.location.href = 'Text0000.htm';
}
return true;">
Mirte
</a>
Using fantasy code. There is no `and' operator in JS, and even
if it were, it would have to be within the `if' statement and its
conditional expression, not without:
if (parent.frames['Play'] && parent.frames['Text'])
{
...
}
Or if either statement should only be executed if the respective
frame is available, omit the `and'.
Note that newlines in attribute values are potentially harmful in XHTML.
The code above is harder to maintain anyway, call a method instead.
Get yourself decent language documentations and look it up.
<http://jibbering.com/faq/>
PointedEars
P.S.: Multiposting to several newsgroups is a Bad Thing.