>       Find the Title with PHP

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter9: Getting Started With Javascript: Creating A Countdown Clock
Section: Chapter Questions
Problem 11CP1
icon
Related questions
Question

please fix this html code so it can be properly executed

 

<!DOCTYPE html>
<html>
<!-- Programming Challange -->>

<head>
</head>
<body>  
   <title> Find the Title with PHP   </title>
   <script language="JavaScript" type="text/javascript">
   //str is passed to the function
   function showHint(str)
   {
       //nothing is typed return
       if (str.length==0)
   {
   document.getElementById("txtHint").innerHTML="";
   return;
}
//check
if (window.XMLHttpRequest)
{
var xmlhttp = new XMLHttpRequest;
}
else //older
{
   var xmlhttp =new ActiveXObject("Microsoft.XMLHTTP");
}
//change event
xmlhttp.onreadystatechange = function()
{
   if (xmlhttp.readyState==4&&xmlhttp.status==200)
{
   document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}
//open
xmlhttp.open("GET", "gethint.php?q="+str, true);
xmlhttp.send();
}
</script>
</body>
</html>

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L