/    Sign up×
Community /Pin to ProfileBookmark

Passing values to and from popup window.

hi guys..
How can i pass values to popup window and back to main window?

plz help with some example code..

Thanx..

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@VikiauthorJul 27.2004 — comeon gurus...i need ur help...anyone knows wat i asked??

plz hurry to reply.

thanx
Copy linkTweet thisAlerts:
@BillyRayJul 27.2004 — plz hurry to reply[/quote]

Given that this is a free service, where members give their time for free, you should be a little less hasty to expect an instant reply.

Having said that, this should give you what you need to know.

When opening a popup window, you can get the handle to that window returned to you:

var winHandle = window.open(url, winName, args);

and then use that handle to reference the opened window:

winHandle.document.forms[0].myFormEl.value = 'wibble';

From the popup, you can use the "opener" property of the window object to refer to the opener:

window.opener.document.forms[0].otherFormEl.value = 'bibble';

Suggest you read up onthe window.open method here:

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp

and the window object (and thus opener property) in general, here:

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp

Hope this helps,

Dan
×

Success!

Help @Viki 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.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

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