/    Sign up×
Community /Pin to ProfileBookmark

Selecting an option box option from a remote window.

Hi all,

I found this script which almost does what I want…
[URL=http://javascript.internet.com/forms/select-value-set.html]http://javascript.internet.com/forms/select-value-set.html[/URL]

But I need it to do this from a pop up window. Reason is that the pop up window will allow you to search a database for a user name and will return the user number. I then need to select this from the option menu in the main window then close the pop up. This will be in the form of a link as there may be more than one member name returned (different last names) and the one chosen or clicked on will change the select option.
Sorry, I’m just a beginner hopeing someone may know how it can be done.

Cheers.
Jay

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceMay 17.2006 — Once you figure out which option you wish to select, by index number, you can do it in one of these two ways:

top.opener.document.formName.selectName.selectedIndex = index;

top.opener.document.formName.selectName.options[index].selected = true;
Copy linkTweet thisAlerts:
@jay019authorMay 17.2006 — Cheers, it all works now! Thanks so much!!! ?
Copy linkTweet thisAlerts:
@phpnoviceMay 17.2006 — You're welcome.

Cheers.
×

Success!

Help @jay019 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.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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