Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3691076
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:06:25+00:00 2026-05-19T04:06:25+00:00

I am trying to use a click event to generate a popup window based

  • 0

I am trying to use a click event to generate a popup window based off of the specific value chosen. I am having trouble with the if statement and trying to access each specific option value. Can any of you give me some hints?

        <select id="offices">
            <option value="Choose an Office">Choose an Office</option>
            <option value="Residential Education (ResEd)" >Residential Education (ResEd)</option>
            <option value="Dean of Students">Dean of Students</option>
            <option value="Office of Student Affairs">Office of Student Affairs</option>
            <option value="Vice-Provost of Student Affairs">Vice-Provost of Student Affairs</option>
        </select>
</div>

function display(){

        var officearray = [{
            Office: "Residential Education (ResEd)",
            ID: "725-2800",
            Description: "The Office of Residential Education is responsible for developing the policies, programs, and staffing which support the intellectual, educational, and community-building activities in student residences.  Second Floor. "
        }, {
            Office: "Dean of Students",
            ID: "723-7833",
            Description: "The Dean of Students office is composed of 13 individual administrative units that are concerned with the general welfare of both undergraduate and graduate students, in and out of the classroom.  Second floor."
        }, {
            Office: "Office of Student Activities (OSA)",
            ID: "723-2733",
            Description: "Services for student organizations, student-initiated major events and programs, and fraternities and sororities.  Second floor."
        }, {
            Office: "Vice-Provost of Student Affairs",
            ID: "725-0911",
            Description: "The Vice Provost for Student Affairs is responsible to the Provost for providing services and programs to undergraduate and graduate students in support of the academic mission of the University.  Second floor."
        }]

        for(var i = 0; i < officearray.length; i++) {
            var o = document.getElementById("offices")
            var oString = o.options[o.selectedIndex].value;

            newwindow2 = window.open('', 'name', 'height=200, width=150')
            var tmp = newwindow2.document
            if (oString == officearray[i].Office) {
                tmp.writeln(officearray[i].Description)
            }

        }
    }
    document.getElementsByTagName('option').addEventListener("click",display,false)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:06:25+00:00Added an answer on May 19, 2026 at 4:06 am

    Thanks for the response. Rather I just changed the onlick event to onchange and got rid of the addEventListener period. I then used the W3C compliant event handler to handle the change event.


    document.getElementById("offices").onchange=display;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use strtotime() to respond to a button click to advance -1
I' trying to use a Linq query to find and set the selected value
I am trying to redirect to a specific path based on HTTP_HOST or SERVER_NAME
I am trying to use delegate to call a function, when a specific set
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use a guid as a resource id in a rest url but
While trying to use LINQ to SQL I encountered several problems. I have table
I trying to use ImageInfo and Jython to get information from a image on
I'm trying to use svnmerge.py to merge some files. Under the hood it uses
I've been trying to use SQLite with the PDO wrapper in PHP with mixed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.