/    Sign up×
Community /Pin to ProfileBookmark

simple test page (consearning frames)

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!

[URL=http://home.cogeco.ca/~swarden2/botx.htm]please check this page[/URL]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliAug 27.2003 — <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)
Copy linkTweet thisAlerts:
@ShampieauthorAug 27.2003 — 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!
×

Success!

Help @Shampie spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...