0

Hi there, i have a piece of code which works in mozilla well but in chrome doesnt.

function yoxi(){

    var xhr = new XMLHttpRequest;
    xhr.open("GET", "yoxi.php", false);
    xhr.send(null);
//  alert(xhr.responseText)



}

function getirus(){

    var xhr = new XMLHttpRequest;
    xhr.open("GET", "getirus.php", false);
    xhr.send(null);
document.getElementById('onlineus').innerHTML=xhr.responseText;






}

setInterval(yoxi, 5000);
setInterval(getirus, 5000);

setinterval doesnt work in chrome repeatedly. what may be the problem? anyone help plzzzz

3
Contributors
8
Replies
26
Views
1 Year
Discussion Span
Last Post by Taywin
0

You're code is flawed. xhr.ResponseText may not have a value right after sending because the request is asynchronous.

Read more here.

0

i tried. i put asunc to true. but nothink changed. even in firefox didnt work. i tried it with empty document like below.

<!Doctype HTML>

<html>
<head>

<script type="text/javascript">
// wrapper for locals

function yoxi(){

    var xhr = new XMLHttpRequest();
    xhr.open("GET", "yoxi.php", false);
    xhr.send(null);
//  alert(xhr.responseText)

}

function getirus(){

    var xhr = new XMLHttpRequest();
    xhr.open("GET", "getirus.php", false);
    xhr.send(null);
document.getElementById('onlineus').innerHTML=xhr.responseText;

}

setInterval(function() {
    yoxi();
}, 2000);

setInterval(function() {
    getirus();
}, 5000);

</script>
</head>
<body>

<div id="onlineus">

</div>
</body>
</html>

it works cool i both browsers (firefox and chrome). i suggest may be the problem of my index.php? this is my index.php below

<?php
session_start();
date_default_timezone_set('Asia/Baku');
include 'conn.php';
ob_start();
include("logfunc.php");
$var=$_SESSION['varr'];
/*
echo '<pre>';
print_r($_SESSION);
echo '</pre>';*/
$now = date('Y-m-d H:i:s', strtotime('now'));
mysql_query("Update users set status='".$now."' where id='".$var."'");

if(!isLoggedIn()) 
{ 
    header('Location: login_form.php'); 
    die(); 
}
 if(isset($_GET['dos']) and $_GET['dos']=="logout"){
                    logout();
                        header('Location: index.php');

                    }

?>
<!DOCTYPE html>
<html>
<head>
<title>Online Rezervləmə Sistemi</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link rel="stylesheet" type="text/css" href="tabs.css" />
<script type="text/javascript" src="bakery.js"></script>

<script src="jquery-1.10.2.js"></script>
<script type="text/javascript">
// wrapper for locals

function yoxi(){

$.ajax({

                                    type: "POST",

                                    url: "yoxi.php",




                                    success: function(res) {



                                    }
                });



}

function getirus(){

    $.ajax({

                                    type: "POST",

                                    url: "getirus.php",




                                    success: function(res) {

                                   document.getElementById('onlineus').innerHTML=res;

                                    }
                });







}

setInterval(function() {
    yoxi();
}, 2000);

setInterval(function() {
    getirus();
}, 5000);

</script>
<link rel="stylesheet" type="text/css" href="style/disler.css" />
<link rel="stylesheet" type="text/css" href="assets/css/styles.css" />
<link rel="stylesheet" type="text/css" href="assets/fancybox/jquery.fancybox-1.3.4.css" />
<script src="js/swfobject.js" language="javascript"></script>
<script src="bizim.js" language="javascript"></script>
<script src="ozfunc.js"></script>
<link rel="stylesheet" href="azer.css">
<link rel="stylesheet" href="jquery.ui.all.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<!--<script src="js/jquery.custom-scrollbar.js"></script>
    <link type="text/css" rel="stylesheet" href="js/jquery.custom-scrollbar.css"/>
<script type="text/javascript">
    $(window).load(function () {
        $("#pageData").customScrollbar();
   //     $("#fixed-thumb-size-demo").customScrollbar({fixedThumbHeight: 50, fixedThumbWidth: 60});
    });
</script>-->
<script src="ui/jquery.ui.core.js"></script>
<script src="ui/jquery.ui.datepicker.js"></script>
<link rel="stylesheet" href="demos.css">

<script type="text/javascript" src="jquery-1.6.min.js"></script>
<script type="text/javascript" src="jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="jquery-ui.css" />
<link href="style/style.css" rel="stylesheet" type="text/css" media="all" /> 
<link href="new1.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="jquery.print.js"></script>
<link rel="stylesheet" href="rent/style.css" />

<!--<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>-->

<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>

<!-- Add fancyBox -->
<link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>

<link rel="stylesheet" href="/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
<style>
.container {
  margin: 0 auto;
  padding: 0 24px;
  max-width: 960px;
}

/* primary header */

.primary-header {
  padding: 24px 0;
  text-align: center;
  border-bottom: solid 2px #cfcfcf;
}


/* content */

.content {
  padding: 48px 0;
  border-bottom: solid 2px #cfcfcf;
}


/* tasks */

.tasks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: solid 1px #dfdfdf;
}

.task:last-child {
  border-bottom: none;
}

/* context menu */

.context-menu {
  display: none;
  position: absolute;
  z-index: 10;
  padding: 12px 0;
  width: 240px;
  background-color: #fff;
  border: solid 1px #dfdfdf;
  box-shadow: 1px 1px 2px #cfcfcf;
}

.context-menu--active {
  display: block;
}

.context-menu__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.context-menu__item {
  display: block;
  margin-bottom: 4px;
}

.context-menu__item:last-child {
  margin-bottom: 0;
}

.context-menu__link {
  display: block;
  padding: 4px 12px;
  color: #0066aa;
  text-decoration: none;
}

.context-menu__link:hover {
  color: #fff;
  background-color: #0066aa;
}
#adavto1, .avtoacil {
    background-color: #FFFFFF;
    border-left: 1px solid #D0D0D0;
    border-top: 1px solid #D0D0D0;
    border-bottom: 1px solid #D0D0D0;
    color: #2A2A2A;
    font-family: Arial;
    font-size: 12px;
    -webkit-border-radius: 4px 0px 4px 4px;
    -moz-border-radius: 4px 0px 4px 4px;
    border-radius: 4px 0px 4px 4px;
    width: 235px;
    height: 30px;
}
.esasi, .esasi1 {
    -webkit-box-shadow: 0px 1px 5px 1px rgba(190, 189, 189, 0.65); 
    -moz-box-shadow: 0px 1px 5px 1px rgba(190, 189, 189, 0.65);
   box-shadow: 0px 1px 5px 1px rgba(190, 189, 189, 0.65); 
}
.esasi1 table tr td{

    padding:12px;

}




.new-folder {

    position:absolute;
    top:10px;
    right:10px;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);

}
.new-folder1 {

    position:absolute;
    top:10px;
    right:10px;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);

}
.tabs {

    border: 1px solid rgb(192, 192, 192);
-webkit-box-shadow: 15px 10px 15px 15px rgba(190, 189, 189, 0.65);
    -moz-box-shadow: 0px 1px 15px 1px rgba(190, 189, 189, 0.65);
    box-shadow: 0px 1px 15px 1px rgba(190, 189, 189, 0.65);
}
#datax::-webkit-scrollbar-track
{
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: #F5F5F5;
}

#datax::-webkit-scrollbar
{
    width: 6px;
    background-color: #000000;
}

#datax::-webkit-scrollbar-thumb
{
    background-color: #C0C0C0;
}

</style>
<script type="text/javascript">
var logout = function() {
  var xhr = new XMLHttpRequest;
    xhr.open("GET", "logout.php", false);
    xhr.send(null);


};
/*
window.onload = function() {
    var winNumber = parseInt(IGS.Bakery.getCookie("adlar"), 10) || 0;
//  IGS.Bakery.deleteAllCookies();
    IGS.Bakery.setCookie("adlar", winNumber + 1);
};
*/ /*
window.onunload = function() {
 //   var winNumber = parseInt(IGS.Bakery.getCookie("adlar"), 10) || 0;
//    IGS.Bakery.setCookie("adlar", winNumber - 1);

   if (winNumber === 1) {
        logout();
    }


     logout();
};
*/
var showCookies = function() {
    alert(IGS.Bakery.getCookie("adlar"));
};
var poz=function(){

     logout();


}

</script>

</head>

<body>
 <div class="butun">
<div id="divPop" style="z-index:500;position:absolute;display:none">

</div>
 <!-- Preloader -->

<div id="preloader">
    <div id="status">&nbsp;</div>
</div>
<div id="preloader1">

</div>
<div id="container" style="min-height:100%;position:relative;width: 1200px; margin-left: auto;margin-right: auto">

  <ul class="tabs" style="height:39px;padding-bottom:0px !important; padding-top:15px; background:#EEEEEE;border-radius:3px"> 
        <li class="active" rel="tab1">Pasient Məlumatları</li>
        <li rel="tab2">Axtar</li>
        <li rel="tab3">Həkimlər</li>
        <li rel="tab4">Həkim Əlavə et</li>
      <li rel="tab5">Müayinə əlavə et</li>
      <li rel="tab6">Otaqlar</li>
      <li rel="tab7">Dental</li>
      <li rel="tab8">Ağız v</li>
      <li rel="tab9">Edit Price</li>
          <li rel="tab10">ADMİN</li>
      <li rel="tab11">rentgen</li>
    </ul>

<div class="tab_container"> 

     <div id="tab1" class="tab_content" style="overflow:hidden">
    <a class="indial" style="cursor:pointer;padding: 12px 36px; font-size: 16px;color:#fff;background:#7CA427;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;float:left;margin-top:35px;margin-right: 15px;" target="_blank">Pasient Ödəməsi</a>
     <a class="indialp" style="cursor:pointer;padding: 12px 36px; font-size: 16px;color:#fff;background:#7CA427;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;float:left;margin-top:35px; margin-right: 15px;" target="_blank">Pasient Məlumatları</a>

     <div class="esasi1" id="esasi1" style="display:none; border:1px solid #c0c0c0; height:400px;background:#fff; width:450px;margin-top:-200px;">
    <div style="padding-top:120px;padding-left:30px;"> <a id="aAddGroup" class="new-folder1" title="Xidmət qrupunun əlavə edilməsi" style="cursor: pointer;">
                <img src="images/plus.png" title="Xidmət qrupunun əlavə edilməsi" class="">
            </a>
            <table>
            <tr><td>Pasientin adı:<td><td><input type="text" id="adavto1" name="name" />
        <input type="text" id="boss1" name="boss"  style="display:none" class="avtoacil"/><a href="#" onclick="poz();">poz</a><a href="#" onclick="showCookies();">show</a></td></tr>

        <tr><td>Ödənilən məbləğ:<td><td><input type="text" class="avtoacil" id="mebleg"/></td></tr>
        <tr><td>Həkim:<td><td><select name="userso" id="userso">
<option default value="0">Hekimi secin..</option>
<?php

$sor=mysql_query("Select * from hekimler where mainid='".$_SESSION['varr']."'");
while($ya=mysql_fetch_array($sor)){
   if($ya['username']!='Estetik'){
      echo '<option value="'.$ya["id"].'">'.$ya['ad'].' '.$ya['soyad'].'</option>';

   }

}




?>


</select></td></tr>
        <tr><td colspan=2><input type="button" value="Ödəmək" class="ode"/></td></tr>
        </table>
        </div>
     </div>
     <div style="margin-bottom: 35px;"></div>
<div class="esasi" id="esasi" style="border:1px solid #fff; background:#fff; margin-top:30px;position:relative;top:0px;left:1200px;">
 <a id="aAddGroup" class="new-folder" title="Xidmət qrupunun əlavə edilməsi" style="cursor: pointer;">
                <img src="images/plus.png" title="Xidmət qrupunun əlavə edilməsi" class="">
            </a>
    <table id="bir" class="con" style="margin-bottom:280px">
                   <tr><th colspan=2>Əlaqə Məlumatlar</th><th colspan=2>Şəxsiyyət vəsiqəsi</th><th colspan=2>Digər Məlumatlar</th></tr>
               <tr><td>Nomre:</td><td><input name="num" type="text" id="num"></td><td>Passport seriya:</td><td><input name="seriya" type="text" id="seriya"></td><td>iş ünvanı:</td><td><input type="text" name="address" id="address"></td></tr> 
              <tr><td>Ad:</td><td><input name="name" type="text" id="name"></td><td>Passport nomre:</td><td><input name="passnumber" type="text" id="passnumber"></td><td>İş yeri:</td><td><input type="text" name="place" id="place"></td></tr> 
               <tr><td>Soyad:</td><td><input name="sname" type="text" id="sname"></td><td>Cinsiyyet:</td><td><input name="sex" type="text" id="sex"></td><td>Vəzifə:</td><td><input type="text" name="profession" id="profession"></td></tr> 
               <tr><td>Ata adı:</td><td><input name="fname" type="text" id="fname"></td><td>Doqulduqu yer:</td><td><input name="yer" type="text" id="yer"></td><td>Yaxın adam (SAA):</td><td><input type="text" name="relative" id="relative"></td></tr> 
                <tr><td>Qeydiyyat tarixi:</td><td><input name="date1" type="text" id="date1"></td><td>Doğum tarixi:</td><td><input name="birthdate" type="text" id="birthdate"></td><td>Yaxın adam tel nomresi:</td><td><input type="text" name="relativephone" id="relativephone"></td></tr> 
               <tr><td>İş nömrəsi:</td><td><input name="worknumber" type="text" id="worknumber"></td><td>Qan qrupu:</td><td><input type="text" name="bloodgroup" id="bloodgroup"></td><td>Email:</td><td><input type="text" name="email" id="email"></td></tr>
                 <tr><td>Mobil:</td><td><input name="cellnumber" type="text" id="cellnumber"></td><td colspan=2></td><td>Aile doktoru:</td><td><input type="text" name="familydoktor" id="familydoktor"></td></tr>
                 <tr><td>Ev tel nomresi:</td><td><input name="homenumber" type="text" id="homenumber"></td><td colspan=2><input type="button" class="styled-button-10" value="Daxil et" name="daxil" id="daxil"></td><td>sekil:</td><td><div id="photos"></div></td></tr>

               </table>
<div id="camera">
    <span class="tooltip"></span>
    <span class="camTop"></span>

    <div id="screen"></div>
    <div id="buttons">
        <div class="buttonPane">
            <a id="shootButton" href="" class="blueButton">Sekli cek</a>
        </div>
        <div class="buttonPane hidden">
            <a id="cancelButton" href="" class="blueButton">Leqv</a> <a id="uploadButton" href="" class="greenButton" >Yukle!</a>
        </div>
    </div>

    <span class="settings"></span>
</div>

<script src="assets/fancybox/jquery.easing-1.3.pack.js"></script>
<script src="assets/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script src="assets/webcam/webcam.js"></script>
<script src="assets/js/script.js"></script>


</div>
</div><!-- #tab1 -->
<div id="tab2" class="tab_content"> 

       <form name="frmMain" onsubmit="return false">
    <table class="dishekimi">
        <tr><td>AD: </td><td><input type="text" name="txtSearch" id="txtSearch" onkeyup="JavaScript:doCallAjax(document.getElementById('txtSearch').value, null, '1', document.getElementById('userid').value);"></td>
        <td>    SOYAD: </td>
            <td><input type="text" name="stxtSearch" id="stxtSearch" onkeyup="JavaScript:doCallAjax(document.getElementById('txtSearch').value, document.getElementById('stxtSearch').value, '1', document.getElementById('userid').value);"></td>
            <td>
        <input type="button" name="btnSearch" id="btnSearch" value="AXTAR" onclick="JavaScript:doCallAjax(document.getElementById('txtSearch').value, '', '1', document.getElementById('userid').value)"></td></tr>
</table>
<br><br>
<span id="mySpan"></span>
</form>

     </div><!-- #tab2 -->
     <div id="tab3" class="tab_content">
    <div id="dishekimi">

 <form name="" onsubmit="return false">
<table class="dishekimi">
<tr><td>AD:</td><td>
            <select name="users" id="users" onChange="showUser(this.value, document.getElementById('teqvim').value, document.getElementById('userid').value);">
<option default value="0">Hekimi secin..</option>
<?php

$sor=mysql_query("Select * from hekimler where mainid='".$_SESSION['varr']."'");
while($ya=mysql_fetch_array($sor)){
   if($ya['username']!='Estetik'){
      echo '<option value="'.$ya["id"].'">'.$ya['ad'].' '.$ya['soyad'].'</option>';

   }

}




?>


</select>
</td>
<td>Tarix:</td><td><input type="text" name="teqvim" id="teqvim"></td>
<td><input type="button" value="TAP" onClick="showUser(document.getElementById('users').value, document.getElementById('teqvim').value, document.getElementById('userid').value);"></td></tr>
</table>



</form>

<div id="txtHint"><b>Melumatlar</b></div>
</div>
</div><!-- #tab3 -->
     <div id="tab4" class="tab_content"> 

          <form method="post">
 <table class="dishekimi">
   <tr><td>  Ad: </td><td><input type="text" id="hekimad" name="hekimad" maxlength="30" /></td></tr>
      <tr><td>  Soyad: </td><td><input type="text" id="hekimsad" name="hekimsad" maxlength="30" /></td></tr>
   <tr><td>  Istifadeci adi: </td><td><input type="text" id="hekimuser" name="hekimuser" maxlength="30" /></td></tr>
 <tr><td>   Parol: </td><td><input type="password" id="hekimpass1" name="hekimpass1" /></td></tr>
   <tr><td>   Təkrar parol: </td><td><input type="password" id="hekimpass2" name="hekimpass2" /></td></tr>
     <tr><td>  Vezife: </td><td><input type="text" name="hekimpos" id="hekimpos" maxlength="30" /></td></tr>
    <tr><td>  Email: </td><td><input type="text" name="hekimemail" id="hekimemail" maxlength="30" /></td></tr>
   <tr><td></td><td><input type="button" value="Qeydiyyat" id="hekimdaxil" name="hekimdaxil" style="height:40px"/><input type="button" value="Siyahi" style="width:120px;" onClick="getir();"></td></tr></table>
</form>
<div id="hekimgetir">hekim siyahisi</div>

     </div><!-- #tab4 -->



      <div id="tab5" class="tab_content"> 
<form method="post">
    <table class="dishekimi">
    <tr><td>AD:</td><td><input type="text" name="muayine" id="muayine"><input type="hidden" value="<?php echo $_SESSION['varr'];?>" id="userid"></td></tr>
    <tr><td colspan="2"><input type="button" id="muayinedax" value="Daxil et"><select id="reng"><option>Secin</option><option value="red" style="background-color:red; text-color:#ffffff">Qırmızı</option>
    <option value="lime" style="background-color:lime; text-color:#ffffff">Lime</option>
    <option value="green" style="background-color:green; text-color:#ffffff">Yaşıl</option>
    <option value="blue" style="background-color:blue; text-color:#ffffff">Göy</option>
    <option value="aqua" style="background-color:aqua; text-color:#ffffff">Mavi</option>
    </select><input type="button" id="listm" value="siyahi"></td></tr>
    </table>
    </form>
        <h2>Dişlərin qiymət təyin edilməsi</h2>
         <div class="qiymetelave">
         <div>
        <img height="60px"  src="arxafon/y1.jpg" width="33px"><input type="text" name="1-ci dis" id="1">
       <img height="80px"  width="33px" src="arxafon/y2.jpg"><input type="text" name="2-ci dis" id="2">
       <img height="80px" width="33px" src="arxafon/y3.jpg"><input type="text" name="3-cu dis" id="3">
     <img height="80px" width="27px" src="arxafon/y4.jpg"><input type="text" name="4-cu dis" id="4">
  <img height="80px"  width="28px" src="arxafon/y5.jpg"><input type="text" name="5-ci dis" id="5">
<img height="80px"  width="30px" src="arxafon/y6.jpg"><input type="text" name="6-ci dis" id="6">
<img height="80px"  width="28px" src="arxafon/y7.jpg"><input type="text" name="7-ci dis" id="7">
<img height="80px"  width="28px" src="arxafon/y8.jpg"><input type="text" name="8-ci dis" id="8">
<img height="80px"  width="28px" src="arxafon/y9.jpg"><input type="text" name="9-cu dis" id="9">
<img height="80px"  width="28px" src="arxafon/y10.jpg"><input type="text" name="10-cu dis" id="10">
<img height="80px" width="28px" src="arxafon/y11.jpg"><input type="text" name="11-ci dis" id="11">
<img height="80px" width="33px" src="arxafon/y12.jpg"><input type="text" name="12-ci dis" id="12">
<img height="80px" width="33px" src="arxafon/y13.jpg"><input type="text" name="13-ci dis" id="13">
<img height="80px" width="33px" src="arxafon/y14.jpg"><input type="text" name="14-ci dis" id="14">
<img height="80px" width="30px" src="arxafon/y15.jpg"><input type="text" name="15-ci dis" id="15">
<img height="80px" width="30px" src="arxafon/y16.jpg"><input type="text" name="16-ci dis" id="16">
         </div>
         <div style="margin-top:10px">

<img height="80px" src="arxafon/a1.jpg"><input type="text" name="32-ci dis" id="32">  
<img height="80px" src="arxafon/a2.jpg"><input type="text" name="31-ci dis" id="31">
<img height="80px" src="arxafon/a3.jpg"><input type="text" name="30-cu dis" id="30">
<img height="80px" width="28px" src="arxafon/a4.jpg"><input type="text" name="29-cu dis" id="29">
<img height="80px" width="28px" src="arxafon/a5.jpg"><input type="text" name="28-ci dis" id="28"> 
<img height="80px" width="28px" src="arxafon/a6.jpg"><input type="text" name="27-ci dis" id="27">
<img height="80px" width="28px" src="arxafon/a7.jpg"><input type="text" name="26-ci dis" id="26">
<img height="80px" width="28px" src="arxafon/a8.jpg"><input type="text" name="25-ci dis" id="25">
<img height="80px" width="28px" src="arxafon/a9.jpg"><input type="text" name="24-ci dis" id="24"> 
<img height="80px" width="28px" src="arxafon/a10.jpg"><input type="text" name="23-cu dis" id="23">
<img height="80px" width="28px" src="arxafon/a11.jpg"><input type="text" name="22-ci dis" id="22">
<img height="80px" width="28px" src="arxafon/a12.jpg"><input type="text" name="21-ci dis" id="21">
<img height="80px" width="28px" src="arxafon/a13.jpg"><input type="text" name="20-ci dis" id="20">    
<img height="80px" class="a14" src="arxafon/a14.jpg"><input type="text" name="19-cu dis" id="19">
<img height="80px" class="a15" src="arxafon/a15.jpg"><input type="text" name="18-ci dis" id="18">
<img height="80px" class="a16" src="arxafon/a16.jpg"><input type="text" name="17-ci dis" id="17">
    </div>
         </div>
<div id="listsiyahi">


</div>
     </div><!-- #tab5 -->


      <div id="tab6" class="tab_content"> 

      <form name="" onsubmit="return false">
<table class="dishekimi">
<tr><td>N:</td><td><select name="rooms" id="rooms" onChange="showUserotaq(this.value, document.getElementById('teqvimotaq').value, this[this.selectedIndex].value, document.getElementById('userid').value);">
<option default value="0">Otaq secin..</option>

<option value="1">Otaq 1</option>
<option value="2">Otaq 2</option>
<option value="3">Otaq 3</option>
<option value="4">Otaq 4</option>
<option value="5">Otaq 5</option>
<option value="6">Otaq 6</option>
</select></td><td>Tarix:</td><td><input type="text" name="teqvimotaq" value="" id="teqvimotaq"></td>
<td><input type="button" value="TAP" onClick="showUserotaq(document.getElementById('rooms').value, document.getElementById('teqvimotaq').value, document.getElementById('rooms')[document.getElementById('rooms').selectedIndex].value, document.getElementById('userid').value);"></td></tr></table>

</form>

<div id="txtHint1"><b>Melumatlar</b></div>

     </div><!-- #tab6 --> 

      <div id="tab7" class="tab_content"> 
    <form name="frmMain" onsubmit="return false">
    <table class="dishekimi">
<tr><td>AD: </td><td><input type="text" name="adaxtar" id="adaxtar" onkeyup="JavaScript:doCallAjaxr(document.getElementById('adaxtar').value, null, '1', document.getElementById('userid').value);"></td>
    <td>  SOYAD: </td><td><input type="text" name="sadaxtar" id="sadaxtar" onkeyup="JavaScript:doCallAjaxr(document.getElementById('adaxtar').value, document.getElementById('sadaxtar').value, '1', document.getElementById('userid').value);"></td>
<td><input type="button" name="btnSearch" id="btnSearch" value="axtar" onclick="JavaScript:doCallAjaxr(document.getElementById('adaxtar').value, '', '1', document.getElementById('userid').value);"></td></tr>

    </table>
    </form>
            <div style="margin-left:0px">Ilk: <input type="text" style="width:80px" id="ilk"> Son: <input type="text" style="width:80px" id="son">
            <input type="button" value="Tam" class="tam" style="height: 30px;width: 80px;"></div>
<div id="receteaxtaris" style="width:500px;height:600px; float:left"></div>


</div><!-- #tab7 -->

      <div id="tab8" class="tab_content"> 
      <div class="giz">
    <form name="frmMain" onsubmit="return false">
    <table class="dishekimi">
<tr><td>AD: </td><td><input type="text" name="adaxtarr" id="adaxtarr" onkeyup="JavaScript:doCallAjaxr2(document.getElementById('adaxtarr').value, null, '1', document.getElementById('userid').value);"></td>
    <td>  SOYAD: </td><td><input type="text" name="sadaxtarr" id="sadaxtarr" onkeyup="JavaScript:doCallAjaxr2(document.getElementById('adaxtarr').value, document.getElementById('sadaxtarr').value, '1', document.getElementById('userid').value);"></td>
<td><input type="button" name="btnSearch" id="btnSearch" value="axtar" onclick="JavaScript:doCallAjaxr2(document.getElementById('adaxtarr').value, '', '1', document.getElementById('userid').value);"></td></tr>

    </table>
    </form>
    </div>
            <!--<div style="margin-left:0px">Ilk: <input type="text" style="width:80px" id="ilk"> Son: <input type="text" style="width:80px" id="son">
            <input type="button" value="Tam" class="tam" style="height: 30px;width: 80px;"></div>-->
<div id="receteaxtaris2" style="width:100%;height:100%; float:left;"></div>

<nav class="context-menu">
  <ul class="context-menu__items">
    <li class="context-menu__item">
      <a href="#" class="context-menu__link" id="ted" rel="">
        <i class="fa fa-eye"></i> Tedaviye kec
      </a>
    </li>
    <li class="context-menu__item">
      <a href="#" class="context-menu__link">
        <i class="fa fa-edit"></i> Edit Task
      </a>
    </li>
    <li class="context-menu__item">
      <a href="#" class="context-menu__link">
        <i class="fa fa-times"></i> Delete Task
      </a>
    </li>
  </ul>
</nav>
<script src="js/contexmenu.js"></script>

</div>  





<!--buraa qeder-->
        <div id="tab9" class="tab_content">
            <table class="dishekimi">

<tr><td> Əməliyyat adı:</td><td><select id="mel" onChange="qiymetq(this.value, <?php echo $_SESSION['varr'];?>);">
                    <option>SEcin....</option>
    <?php
    $sor=mysql_query("Select * from muayine where mainid='".$_SESSION['varr']."'");
    while($y=mysql_fetch_array($sor)){

        echo '<option value="'.$y['name'].'" rel="'.$y['id'].'">'.$y['name'].'</option>';
    }


    ?>
    </select></td></tr></table>
        <div id="qiymetedit">
</div>
     </div><!-- #tab8 -->

         <div id="tab10" class="tab_content"> 
admin zone
<?php

if($_SESSION['varr']=='5'){
?>
<script>
$(document).ready(function() {
$('#userdaxil').click(function(e){


                        if($('#userpass1').val()==""){
                           alert("Xahis edirik parol yazasiniz");

                        }
                          else if($('#userpass2').val()==""){
                           alert("Xahis edirik parolun tesdiqini yazasiniz");

                        }
                          else if($('#userpass2').val()!=$('#userpass1').val()){
                           alert("Yazdiqiniz sifreler uyqun gelmir");

                        }
                          else {
                           $.ajax({
                        type: "POST",
                        url: 'userajax.php',
                        data: "userpass1="+ $('#userpass1').val()+"&userad="+ $('#userad').val(),
                        success: function(data){
                        alert(data);
                        }
                        });

                        document.getElementById('userpass1').value="";
                        document.getElementById('userpass2').value="";
                        document.getElementById('userad').value=""; 
                        }


                    });
});
                    </script>

     <form method="post">
 <table class="dishekimi">
    <tr><td>  Istifadeci adi: </td><td><input type="text" id="userad" name="userad" maxlength="30" autocomplete="off" /></td></tr>
 <tr><td>   Parol: </td><td><input type="password" id="userpass1" name="userpass1" /></td></tr>
   <tr><td>   Təkrar parol: </td><td><input type="password" id="userpass2" name="userpass2" /></td></tr>
   <tr><td></td><td><input type="button" value="Qeydiyyat" id="userdaxil" name="userdaxil" style="height:40px"/>
   <input type="button" value="Siyahi" style="width:120px;" class="getiradmin"> <!--onClick="getir();"--></td></tr></table>
</form>


<?php

}

?>

<div id="userlist">



    </div>



<div id="onlineus">



    </div>


     </div>

      <div id="tab11" class="tab_content">
        <form name="frmMain" onsubmit="return false">
    <table class="dishekimi">
<tr><td>AD: </td><td><input type="text" name="adaxtar" id="adaxtar" onkeyup="JavaScript:doCallAjaxrent(document.getElementById('adaxtar').value, null, '1', document.getElementById('userid').value);"></td>
    <td>  SOYAD: </td><td><input type="text" name="sadaxtar" id="sadaxtar" onkeyup="JavaScript:doCallAjaxrent(document.getElementById('adaxtar').value, document.getElementById('sadaxtar').value, '1', document.getElementById('userid').value);"></td>
<td><input type="button" name="btnSearchrent" id="btnSearchrent" value="axtar" onclick="JavaScript:doCallAjaxrent(document.getElementById('adaxtar').value, '', '1', document.getElementById('userid').value);"></td></tr>

    </table>
    </form>
            <div id="rentaxtaris" style="width:500px;height:600px; float:left"></div>
            <div style="float:right; width:500px; min-height:100%;position:relative;">
                <div id="rentuser"></div>
    <div id="main">

<div class="upload_box">
<form method="post" enctype="multipart/form-data">
     <label for="images" id="selected">Şəkil(lər)i seç</label>
<button type="button" id="btn" class="styled-button-2">Şəkilləri yüklə</button>

 <input type="file" name="images" id="images" multiple>

    </form>  
</div>

        <table id="image-list" style="margin-top:10px">

        </table>
<div id="response"></div>

<div id="printdivrent"></div>
    </div>
    <div style="clear:both"></div>


            </div>
         <script src="rent/upload.js"></script>
      </div>
     <div class="cix" style="position:absolute; float:right;top:10px;right:40px;"><a href="?dos=logout"><strong>Cixis</strong></a><br></div>
 </div> <!-- .tab_container --> 

</div> <!-- #container -->
<div style="clear:both"></div>


    <div id="toPopup"> 

        <div class="close"></div>
        <span class="ecs_tooltip">ESC-i sixin <span class="arrow"></span></span>
        <div id="popup_content"> <!--your content start-->
        <div style="width:280px;height:130px; display:none;z-index:99;background:#F4F6FA;border: 1px #bbbbbb solid;webkit-box-shadow: 0px 1px 10px rgba(0,0,0,0.25);moz-box-shadow: 0px 1px 10px rgba(0,0,0,0.25);" class="tekrar">

        Həftənin içində olan növbəti günlər

        <div id="zam"></div>

            <input type="button" value="bagla" id="gunbag" style="margin-top:30px; width:150px">
        </div>
           <form method="post" action="">
            <table class="dishekimi">
                <tr><td>Ad : </td><td><input type="text" id="adavto" name="name" /></td></tr>
        <tr><td></td><td> <input type="text" id="boss" name="boss"  style="display:none"/></td></tr>
                    <tr><td></td><td> <input type="text" id="silid" name="silid" style="display:none"/></td></tr>
        <tr><td>Otaq ID:</td><td><select name="room" id="room">
                        <option value="0">Secin..</option>
                        <option value=null>Boş</option>
                        <option value="1">Otaq 1</option>
                        <option value="2">Otaq 2</option>
                        <option value="3">Otaq 3</option>
                        <option value="4">Otaq 4</option>
                        <option value="5">Otaq 5</option>
                        <option value="6">Otaq 6</option>
                    </select></td></tr>
        <tr><td>Sekil:</td><td id="sekil"></td></tr>
        <script type="text/javascript">
            $(function(){
                var pickerOpts = {
                //  appendText: "mm.dd.yy",
                    dateFormat: 'dd.mm.y',
                    defaultDate: "",
                    showOtherMonths: true
                };  
                $("#date").datepicker(pickerOpts);
            });
        </script>
        <tr><td>Tarix:</td><td><input type="text" name="date" id="date" value=""></td></tr>
        <tr><td>Muayine:</td><td><select name="mname" id="mname">
        <option value="0">Secin..</option>
            <?php
            mysql_connect('localhost', 'root', '');
            mysql_select_db('adminka');

            $select=mysql_query("Select * from muayine where mainid='$var'");
            while($selecty=mysql_fetch_array($select)){

                echo '<option value="'.$selecty['id'].'">'.$selecty['name'].'</option>';

            }



            ?>

        </select></td></tr>
        <tr><td>Elave:</td><td><textarea name="elave" id="elave" rows=2 cols=15></textarea></td></tr>
        <tr><td>Hekimler:</td><td><input type="text" id="doctor" name="hekim" value=""></td></tr>
        <tr><td></td><td style="display:none"><input type="text" name="hekimid" id="hekimid" value=""></td></tr>
            <tr><td></td><td><input type="text" name="hekimem" id="hekimem" value=""></td></tr>
        <tr><td>Vaxt:</td><td><div id="fromin" style="float:left">
        <input type="text" name="from" id="from"  style="width:70px; height:18px;"></div>

        <select name="to" id="to" style="width:70px">
        <?php

        ?>
        </select>
        </td></tr>

        <tr><td colspan="2" style="height:40px"><input type="button" id="dax" name="daxil" style="width:200px; margin-left:35px;" value="VAXT YAZ" onclick=”onload();”><input type="button" id="rep"  value="Tekrarla"></td></tr>
        </table>
       </form>

        </div> <!--your content end-->

    </div> <!--toPopup end-->



               <div id="toPopup1"> 

        <div class="close"></div>
        <span class="ecs_tooltip">ESC-i sixin <span class="arrow"></span></span>
        <div id="popup_content"> <!--your content start-->
         <table class="dishekimi">
            <tr><td>id:</td><td><input type="text" name="pid" id="pid"></td></tr> 
           <tr><td>Ad:</td><td><input type="text" name="ad" id="popad"></td></tr> 
            <tr><td>SoyAd:</td><td><input type="text" name="popsad" id="popsad"></td></tr>
            <tr><td>Ata adi:</td><td><input type="text" name="popaad" id="popaad"></td></tr>
            <tr><td>Cib tel:</td><td><input type="text" name="popcibtel"></td></tr>
            <tr><td>ev tel:</td><td><input type="text" name="popevtel"></td></tr>
            <tr><td>email:</td><td><input type="text" name="popemail" id="popemail"></td></tr> 
            <tr><td colspan="2" style="height:40px"><input type="button" id="editxeste" name="daxil" style="width:200px; margin-left:65px;" value="EDIT"></td></tr>


            </table>

        </div> <!--your content end-->

    </div>
      <div id="toPopup2"> 

        <div class="close"></div>
        <span class="ecs_tooltip">ESC-i sixin <span class="arrow"></span></span>
        <div id="popup_content"> <!--your content start-->

     <div id="his" style="height:auto">

        </div>
        </div> <!--your content end-->

    </div>
    <div class="loader"></div>
    <div id="backgroundPopup"></div>
<div style="clear:both; margin-bottom:0px; width:100%; height:10px;"></div>

   <script type="text/javascript">

$(document).ready(function(){
    $('.fancybox').live('mouseenter', function(){
        $(this).fancybox();
    });
});

</script>
</div>
</body>
</html>

thanks for attention

0

If you put an alert in the success function, do you see it pop up? If not, then there is something wrong with yoxi.php and/or getirus.php

0

i tried both functions. in the success function inside of yoxi() function doesn alert any message. below is the content of yoxi.php

<?php
session_start();

include 'conn.php';

date_default_timezone_set('Asia/Baku');

function yoxi() 
{ 

        $now = date('Y-m-d H:i:s', strtotime('now'));

        $poz=$_COOKIE['adlar'];

        $res=mysql_query("Update users set status='".$now."' where id='".$poz."'");

        if($res){

            echo 'alindi';

        }
        else {

            echo 'alinmadi';
        }

        return $poz;
}

yoxi();


?>

note! . but this code works well in Firefox

0

From what I read the manual, how could you use $_COOKIE[...] in yoxi.php without setting cookie in your page???

Edited by Taywin

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.