Jump to content

I Dont Get Data Results


garevn

Recommended Posts

Hello i use a javascript in order to display data from my data page.At the moment the table is displayed but with no values need some help probably.Alo it would be great if there is a way using an if else statement to run a 2nd or a 3rd queri dipending on user inputsMy main page (probably is right since i get table but with no values):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]"><html xmlns="[url="http://www.w3.org/1999/xhtml"]http://www.w3.org/1999/xhtml[/url]"><head><script type="text/javascript">function showUser(){ if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari  xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } var t=document.getElementById("type"); var t_val = t.options[t.selectedIndex].value; var c_val = document.getElementById("checkin").value; var r_val = document.getElementById("checkout").value;  xmlhttp.onreadystatechange=function() {  if (xmlhttp.readyState==4 && xmlhttp.status==200)  {   document.getElementById("txtHint").innerHTML=xmlhttp.responseText;  } }  xmlhttp.open("GET","check11.asp?q=" + t_val + "&c=" + c_val+"&r=" +r_val, true);  xmlhttp.send();}</script><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body><form action=""> <select id="type" onchange="showUser();">  <option value="">types</option>  <option value="single">single</option>  <option value="double">double</option>  <option value="suite">suits</option> </select> <input id="checkin"  onchange="showUser();" size="22"/> <input id="checkout"  onchange="showUser();" size="22"/></form><br /><div id="txtHint">here...</div></body></html>

my data page (need some help here i think):

<
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...