Jump to content

How I do a debug for Html, javascript and PHP (debug con HTML, javascrip,php)


bgva2005

Recommended Posts

Hi, I am new with php, html and javascript, I would like to know how people make debugs for html, javascript and PHP all together. here a example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

 

<html>

<head>

    <title>Customer Account Information</title>

    <script type="text/javascript">

        function requestCustomerInfo() {

            var sId = document.getElementById("txtCustomerId").value;

            top.frames["hiddenFrame"].location = "GetCustomerData.php?id=" + sId;

        }

       

        function displayCustomerInfo(sText) {

            var divCustomerInfo = document.getElementById("divCustomerInfo");

            divCustomerInfo.innerHTML = sText;

        }

    </script>

</head>

<body>

    <p>Enter customer ID number to retrieve information:</p>

    <p>Customer ID: <input type="text" id="txtCustomerId" value="" /></p>

    <p><input type="button" value="Get Customer Info" onclick="requestCustomerInfo()" /></p>

    <div id="divCustomerInfo"></div>

</body>

</html>

For HTML ypu pass it through HTML validator: validator.w3.org/

For JavaScript you use FireBug (or similar tool for browser other than FF)

For PHP... there are many tools and options, depending on what your coding style is. The very basic is an IDE with syntax error detection (like NetBeans), and using some sensible form of error handling (that include error logging)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.