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

  • SEARCH
  • Home
  • 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 7193903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:15:48+00:00 2026-05-28T20:15:48+00:00

I didn’t get any more responses after the previous question I had. I got

  • 0

I didn’t get any more responses after the previous question I had. I got a ton of help from the last question, thanks to all. How I’m doing this is, based on the selection “Concerning” it will pull a mirrored index value(email address) from an array and replace the “recipient” value with it. There are a few selections that will pull the same email address. Here is the last issue I’m having – The test page with this java script with “email#1, email#2,….” worked on a test page from mtsherman(thanks a bunch!). When I add the actual emails into this array, it won’t pull the value over to the recipient value. It’s probably a very simple fix, but I’m novice and stumped! Thanks in advance.

<html>
<head>
<script language="JavaScript">
document.getElementById('Concerning').onchange = function() { 
    var myArray = ["Empty", 
                   "None@none.com", 
                   "None1@none.com", 
                   "None2@none.com", 
                   "None1@none.com", 
                   "None4@none.com", 
                   "None5@none.com", 
                   "None1@none.com", 
                   "None7@none.com", 
                   "None8@none.com",
           "None9@none.com",
           "None5@none.com",
           "None8@none.com"];

    document.getElementsByName('recipient')[0].value = myArray[this.selectedIndex];
};
</script>
</head>
<body>
<form action="/cgi-bin/formmail" method="post">
<select id="Concerning">
                    <option value="Choose One">Choose One
            <option value="Benefits">Benefits
            <option value="Customer_Service">Customer Service
            <option value="Employee_Paperwork">Employee Paperwork
            <option value="Human_Resources"> Human Resources
            <option value="Open_Positions">Open Positions
            <option value="Payroll">Payroll
            <option value="Quote_Request">Quote Request
            <option value="Safety">Safety
            <option value="Technical_Support">Technical Support
            <option value="Training">Training
            <option value="Unemployment">Unemployment
            <option value="Workers_Compensation">Workers' Compensation
    </select>
<input TYPE="hidden" NAME="recipient" VALUE="">
    <input TYPE="hidden" NAME="subject" VALUE="Contact Form">
    <input TYPE="hidden" NAME="email" VALUE="postmaster@company.com">
    <input TYPE="hidden" NAME="required" VALUE="Name,Phone,Email,Concerning,Comments">
</form>
</body>
</html>
  • 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-28T20:15:49+00:00Added an answer on May 28, 2026 at 8:15 pm

    Your code is running before the page has loaded. You should see an error in your JavaScript console complaining that document.getElementById('Concerning') is null. Use an onload handler to delay execution of your code until the page is ready:

    window.onload = function () {
        document.getElementById('Concerning').onchange = function () {
            ...
        };
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I didn't get any responses from the asp.net forum, so I thought I'd try
Didn't find any from their website. I mostly just trying to see which one
I didn't see any similar questions asked on this topic, and I had to
I didn't give a lot of info in my last question. I've built llv8call
I didn't get any overlay change when my teammates make changes or add a
didn't found any help with the search... I'm going to do something like loading
I didn't find any documentation as to why XPath support was dropped from jQuery
Didn't got any luck finding an answer on google , so this is my
I didn't get the answer to this anywhere. What is the runtime complexity of
I didn't use Prototype.js before, when I use jquery, I can get an element

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.