/    Sign up×
Community /Pin to ProfileBookmark

write from popup in popup

Hello all,
at the moment I’m writing on some javascript stuff. Never used it before, I’m very impressed of the things you can do with javascript:>
But at all there is a problem i don’t get solved yet:

From a normale page, there is opened a popup, which holds a form.
When pressing a button/picture in this popup another popup should open.
After doing some stuff in the second popup, this one should write a value in a speicified field of the first popup.
at this point i got stuck.

I tried it with window.opener.document.aForm.aField.value = “abc”,
but it does not work:/
Is it possible to set values from a popup into another popup? or is it in general possible to set values of fields in popups?
Here is the javascript code:

<script>
function setPopupValue(fieldname, fieldvalue)

if (self.opener && !self.opener.closed) {

opener.document.basicSearch[fieldname].input.value = fieldvalue;
opener.focus();

}
window.close();
</script>

a lot of greetings and in advance
steftom

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @steftom 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...