Ajax页面重定向在localhost页面中工作但不在实时页面中工作

时间:2017-05-17 08:03:49

标签: javascript php jquery html ajax

Ajax页面重定向作为本地主机页面工作,但不在实时环境中工作。 xmlhttp.open("GET", "http://priceyogi.com/sriram/user_qua.php", true);

这适用于netbeans项目,我希望它能够在实时服务器上运行。

<html>
        <head>
            <script src="93/2153_1.js"></script>
            <meta charset="UTF-8">
            <title>AMS</title>
            <style type="text/css">
                @import url("240/1010.css");
                @import url("240/fonts.css");
                #printable { display: none; }
                @media print
                {
                    .noprint {display:none;}
                }
            </style>
        </head>

    </style>

    <script>
            function S014578()
        {
            var xmlhttp = new XMLHttpRequest();
            xmlhttp.onreadystatechange = function ()
            {
                if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
                {
                    if (xmlhttp.responseText == 'E810')
                    {
                        alert('DB CONNECTION ERROR');
                    } else
                    {

                        document.getElementById("ActionScreen").innerHTML = xmlhttp.responseText;
                    }
                }
            }

            xmlhttp.open("GET", "http://priceyogi.com/sriram/user_qua.php", true);
            alert("jddejb");

            xmlhttp.send();
        }
    </script>
    <body >
        <div id="TRANS">
            <div id="companyheader">
                <div class="noprint">
                    <cmpanyname><img src="images/L1010.png"  align="center" width="70px" style="margin-top:-27px;"/>  Packers & Movers</cmpanyname>
                    <br><cmapnymo>your respiratory partner</cmapnymo>
                    <div id="WV"></div>
                </div>
            </div><BR><BR>
    <?php
    date_default_timezone_set('Asia/Kolkata');
    echo '<div id="body" >';
    echo '<div class="noprint">';
    echo '<div id="home" >';
    echo'<div class="noprint">';
    echo '<div id="menu">';
    echo '</div>';
    echo '</div>';
    echo '<div id="ActionScreen">';
    echo '<input placeholder="USER NAME" value="" style="text-align:center; margin-top: 50px; width: 300px; height: 50px;" id="SH233455UN" type="text"><br>';
    echo '<input placeholder="PASSWORD" value="" style="text-align:center; margin-top: 20px; width: 300px; height: 50px;" id="SH233455PWD" type="text"><br>';
    echo '<input placeholder="PASSWORD" value="LOGIN" style="text-align:center; margin-top: 30px; width: 300px; height: 50px;" id="SH233455PWD" type="button" onClick="S014578()";>';
    echo '</div> ';
    echo '</div>';
    echo '</div>';
    echo '</div>';
    echo '</div>';
    echo ' <span id ="PS"></span>';
    ?>
            <script>
                W2153_1_3();
            </script> 
    </body>
    </html>

0 个答案:

没有答案