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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:51:05+00:00 2026-06-03T12:51:05+00:00

I have an html page which contains a div that displays the html from

  • 0

I have an html page which contains a div that displays the html from an external php file.
It works great until I add a DOCTYPE declaration to the html page. The page continues to function, except the external content does not appear in the div.

<!DOCTYPE HTML>
<html dir="ltr" lang="en-US">
<head>

<title>Test Page</title>

<!--meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"-->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

<script type="text/javascript" src="./inc/jquery.js"></script>
<script type="text/javascript">

    function getinfo()
        {
        $.post('prodinfo.php', { prodcode: prodcodeform.prodcodevar.value},
            function(output)
            {
            $('#prodinfo').html(output).show;
            });
        }

    function hideinfo()
        {
        $('#prodload').hide();
        $('#openprodinfo').show();
        }

    function showinfo()
        {
        $('#prodload').show();
        $('#openprodinfo').hide();
        }
</script>
</head>
<body>
<input style="position:relative;" type="button" class="button" id="openprodinfo" title="Open" value="INFO" onclick="showinfo();">
<DIV id="prodload" style="position:absolute;margin-left:auto;margin-right:auto;display:none;text-align:center;background-color:#000000;z-index:200;border:1px solid #4e443b;">

    <div id="prodinfo" style="position:relative;display:block;top:0;width:1000px;height:820px;background-color:#ffffff;margin-left:auto;margin-right:auto;">
    </div>

    <form name="prodcodeform">
    <input type="text" readonly="readonly" id="prodcodevar" name="prodcodevar" value="nil" >
    </form>

    <div ID="prodinfobutton" style="position:relative;">
    <input  style="position:relative;" type="button" class="button" id="closeprodinfo" title="Close" value="CLOSE" onclick="document.getElementById('prodcodevar').value='nil'; hideinfo(); ">
    </div>

    <input type="button" id="button001" value="ONE" onclick="document.getElementById('prodcodevar').value='item1'; getinfo();">

    <input type="button" id="button002" value="TWO" onclick="document.getElementById('prodcodevar').value='item2'; getinfo();">


</DIV>


</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-06-03T12:51:08+00:00Added an answer on June 3, 2026 at 12:51 pm

    You are switching to Standards mode, so your browser is no longer playing the game of being compatible with Internet Explorer 4.

    prodcodeform.prodcodevar.value will error because prodcodeform is undefined.

    You don’t get a global variable for every element with an id or name in a document.

    Change:

    <form name="prodcodeform">
    

    To

    <form id="prodcodeform" method="post" action="prodinfo.php">
    

    … and make it do something sane when a non-Ajax request gets posted (move it so it is around the buttons, make them submit buttons, and cancel the default event if the JS succeeds).

    Then add:

    var prodcodeform = document.getElementById('prodcodeform');
    

    before you try to use the variable.

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

Sidebar

Related Questions

In the following HTML page, I have a div, which contains two spans (
I have a page which contains a html.RenderPartial, that renders an ASP.NET MVC partial
I'm pretty new to PHP and have a String which contains an HTML page.
in my aspx page i have a div which contains simple html ,has some
I have an HTML page (say welcome.html) which contains an iframe to a page
I have this html page which is very simple, it contains a text box
We have an HTML page which displays a bunch of pretty bars using divs
I'd like to have an HTML page which displays a single PNG or JPEG
I have a page that contains an iframe that gets loaded using Javascript: index.html
I'm using php to generate an html page that displays blog/thread items, and I

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.