Welcome Guest, Not a member yet? Register   Sign In
Expected '/' error in javascript code
#1

[eluser]nandish[/eluser]
Code:
function getYear(school){
    xmlHttp=GetXmlHttpObject();  
    state = $("#state option:selected").text();
    statename = state;
    schname = school;
    if(school == 'Select a School'){
        return false;
    }
    href ='/index.php/cseureport/yearAjaxreq/'+school+'/'+state;
  if (xmlHttp==null){
      alert ("Your browser does not support AJAX!");
      return;
    }
   xmlHttp.onreadystatechange = stateYear;
    xmlHttp.open("POST",href,true);
    xmlHttp.send(null);
}
//----------------------------------------------------------------------------------
function stateYear(){
  if(xmlHttp.readyState == 4){
    if(xmlHttp.status == 200){

    document.getElementById('yeardd')[removed] = xmlHttp.responseText;
    }}
}

//------------------------------------------------------------------------------------------------
function getMyprofile(userName){
    xmlHttp=GetXmlHttpObject();   //Ajax request for userID
    href ='/index.php/cseureport/getuserID/'+userName;
  if (xmlHttp==null){
      alert ("Your browser does not support AJAX!");
      return;
    }
   xmlHttp.onreadystatechange = stateuserID;
    xmlHttp.open("POST",href,true);
    xmlHttp.send(null);
}
//--------------------------------------------------------------------------------------------
function stateuserID(){
  if(xmlHttp.readyState == 4){
    if(xmlHttp.status == 200){
    document.getElementById('usedID').value = xmlHttp.responseText;
    }
    var userID = document.getElementById('usedID').value;
document.location.href = '/index.php/userEdit/'+userID+'/userAdmin/'
    }
}
//-------------------------------------------------------------------------------------------------
function GetXmlHttpObject(){
var xmlHttp=null;
try{
  xmlHttp=new XMLHttpRequest();
  }
catch (e){
  try{
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e){
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}
//--------------------------------------------------------------------------------------------------
function logout(){
    $("#form")[0].action = '/index.php/userLogon';
    $("#form")[0].submit();
}
//---------------------------------------------------------------------------------------------------
$(document).ready(function(){
    $("A.find").mouseover(function(){
        this.title = 'Click here for Edit profile';
    });
});

//--------------------------------------------------------------------------------------------------
function subYear(state,schol,year){  
$.post('/index.php/cseureport/yearAjaxreq/'+schol+'/'+state,function(result){
$('#yeardd').html(result);

});

}
//--------------------------------------------------------------------------------------------------
function subschool(state,schol,year){
    $.post('/index.php/cseureport/schoolAjaxreq/'+state,function(items){
       $('#schooldd').html(items);
       if(items){
          restoreDD(state,schol,year);
       }
        }
       );
}
//----------------------------------------------------------------------------------

Thanx

[Mod edit: Removed [size] and [color] tags and put code inside a [code] block]


Messages In This Thread
Expected '/' error in javascript code - by El Forum - 09-17-2008, 01:30 AM
Expected '/' error in javascript code - by El Forum - 09-17-2008, 01:50 AM
Expected '/' error in javascript code - by El Forum - 09-17-2008, 11:27 AM
Expected '/' error in javascript code - by El Forum - 09-18-2008, 07:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB