Click to See Complete Forum and Search --> : simple test page (consearning frames)


Shampie
08-27-2003, 10:16 AM
Hello again,

I am using a 'crossbrowser' object wherein I am trying to modify the value of a textbox.
Modifying the textbox in the grey area by clicking the button in the white area works.
Modifying the textbox in the white area by clicking the button in the grey area does not work.
It seems to only have a 'one-way' communication.
Any solution?

Thanks!



please check this page (http://home.cogeco.ca/~swarden2/botx.htm)

Khalid Ali
08-27-2003, 10:33 AM
<script type="text/javascript">var ctr=0;</script>
<form id="form1" action="">
<input type="text" name ="t1"/>
<input type="button" value="modify" onclick="this.form.t1.value = ctr++;"/>
</form>

The above should work with all newer browsers(that support js)

Shampie
08-27-2003, 10:52 AM
though in the first place i couldn't figure out you solution exactly. after some playing with it this worked:
replacing the line
parent.iframe.form.location.value = "it works";

with
this.parent.form.location.value = "it works";


the 'this' points towards the 'by browser loaded' page??

Thank you for your help!