change text field from within an iframe
- From: "sid derra" <ng_at_emolife.net@xxxxxxxx>
- Date: Fri, 31 Mar 2006 14:00:08 +0200
hi
i am trying to change the value of a text field on my page dynamically,
every time an iframe loads.
#==========
the code where the text field is looks like this:
<form name="test_form">
<input type="text" name="test_field" value="initialized" />
</form>
#==========
the iframe is embedded like this:
<iframe src="iframe_content.php" name="page" />
#==========
and the iframe_content.php site does this, before it gets to the <html> tag:
<script language="javascript">
document.parent.test_form.test_field.value = 'page X loaded';
</script>
#==========
i also have tried "frames[0]" and "parent" instead of "top". no success.
what i want it to do is, as soon as he iframe_content.php site loads, the
text field (test_field) should show "page X loaded", where "X" is a value
that's being dynamically set.
the problem is, that it doesn't do that. any ideas on what i would have to
change?
thanks a lot in advance!
sid
.
- Follow-Ups:
- Re: change text field from within an iframe
- From: Erwin Moller
- Re: change text field from within an iframe
- Prev by Date: OnClick in Div only works when user clicks text
- Next by Date: Re: JavaScript and RegEx not working on Safari...
- Previous by thread: OnClick in Div only works when user clicks text
- Next by thread: Re: change text field from within an iframe
- Index(es):