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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:12:33+00:00 2026-05-19T02:12:33+00:00

I really hope this isn’t a stupid question, but this HTML seems too simple

  • 0

I really hope this isn’t a stupid question, but this HTML seems too simple to fail. Still, it fails.

I have a page that starts with a form, and after the form, I have some more elements. Those elements are never displayed! Here’s the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>CGI Test</title>
</head>
<body>
    <form enctype="multipart/form-data" method="post" action="/cgi-bin/upload.cgi" target="upload_target">
        <input type="hidden" name="cmd" value="uploadBackgroundFile" />
     <p>File Upload:
     <input type="file" name="file" value="" /> (Select A Local File)</p>
     <p><input type="submit" name="cgitest" value="Submit Request" /></p>
        <iframe id="upload_target" name="upload_target" src=""
            style="visibility: hidden; width: 500px; height: 300px; border: 2px solid black;" />
    </form>
    <p />
    <hr />
    <h1>List of uploaded files:</h1>
    <ul id="listBackgroundFiles">
        <li>(Nothing loaded yet)</li>
    </ul>
</body>
</html>

Also, if I call “document.getElementById(‘listBackgroundFiles’)”, it returns null. The elements after the form aren’t just not displayed, they don’t seem to exist at all!

This doesn’t appear to be a browser issue…I get the same problem in Internet Explorer 7.0.6002.18005, Firefox 3.6.12, Chrome 5.0.375.99, Opera 10.60.3445, and Safari 5.0.2 (7533.18.5), all running (sadly) under Windows Vista. I ran the page through the W3C and WDG validators, and those didn’t show any problems. Finally, if I move those elements above the form, they display just fine. It seems to be an issue with putting elements after the form.

Again, I apologize if this is a stupid question, but I’m baffled by how something this simple could fail so consistently.

  • 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-19T02:12:33+00:00Added an answer on May 19, 2026 at 2:12 am

    change

    <iframe id="upload_target" name="upload_target" src=""
                style="visibility: hidden; width: 500px; height: 300px; border: 2px solid black;" />
    

    to

    <iframe id="upload_target" name="upload_target" src=""
                style="visibility: hidden; width: 500px; height: 300px; border: 2px solid black;" ></iframe>
    

    As far as I know, <iframes> and <scripts> should always be closed by writing another closing tag, not in a single tag.

    Check this link for the a list of HTML Tags, only tags that are self closed in this list, can and SHOULD be self closed: List of HTML Tags

    Although according to my experience, script and iframe tags are the most dangerous ones.

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

Sidebar

Related Questions

OK, this isn't really a question to achieve anything practical, but still it is
This really, really urks me, so I hope that someone can give me a
My question really has three related parts which I hope you can help me
Really simple question - how do I do a search to find all records
Really my question has more to do with the server-side scrubbing of html that's
HI im totally stuck with this one at the moment and i really hope
I really like DevX components, but they are pretty expensive, maybe anyone knows free
I really should upgrade to Firefox 3, but I'm very dependent on Firebug working
I did search briefly but not really sure what I'm asking. Just dipping my
Really stuck on trying to write code to unzip a file or directory on

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.