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 7717699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:58:08+00:00 2026-06-01T02:58:08+00:00

Re-Edited: I went over to W3schools and played around in there javascript editor window

  • 0

Re-Edited:
I went over to W3schools and played around in there javascript editor window to see what was going on. Here is a shorter script.

<html>
<body>
<script type="text/javascript">
var eType = document.getElementById("Type")
</script>
<select class="field select addr" id="Type"> 
        <option value="Type:L" selected="selected">Location</option>
        <option value="Type:C">Corporate</option>
        <option value="Type:R">Remittama</option>
        <option value="Type:M">Mailing</option>
        </select>
<script type="text/javascript">
document.write(eType);
</script>
</body>
</html>

I did what ThiefMaster suggested on how to get the element by not using the .text or .value but as you can see if you run this code I still get a null at this step of the process. From what I can see and many suggestions I am doing this correctly. I know I must be missing something. Can anyone see it?

  • 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-06-01T02:58:10+00:00Added an answer on June 1, 2026 at 2:58 am

    You’re trying to get the element before you’ve actually put it on the page. Fix the order, and don’t use document.write.

    <html>
    <body>
    
    <select class="field select addr" id="Type"> 
            <option value="Type:L" selected="selected">Location</option>
            <option value="Type:C">Corporate</option>
            <option value="Type:R">Remittama</option>
            <option value="Type:M">Mailing</option>
            </select>
    <script type="text/javascript">
    var eType = document.getElementById("Type")
    document.body.appendChild(document.createTextNode(eType));
    </script>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edited after getting answers Some excellent answers here. I like Josh's because it is
// edited by Neil Butterworth to conserve vertical space #include <stdio.h> struct A; struct
Edited Question: This should be clear. using System; namespace UpdateDateTimeFields { class Program {
Edited: SOLUTION FOUND. This is strange and not the best solution, but I just
(Edited a lot) I've got some classes with Abstracts Members. The concrete type of
--edited for clarity (hopefully) I have an XML file that looks something like this:
[Edited: After cross-testing on a fresh machine and some additional research, this appears to
Edited to Add * I haven't found a solution for this one yet, can
edited, this is it function handleDate( timestamp ) { var n=new Date(), t, ago
Edited by OP. My program is in need of a lot of cleanup and

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.