Varios errores
la estructura if else no es correcta,
if(condicion..){
// hago esto
}esle{ //si no
// hago esto otro
}
estás haciendo una comparación por lo que debes de usar ==
type == 'ROOT'
si no estás simplemente asignando
type = 'ROOT'
Para finalizar no veo el objeto del parámetro username
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript"> //<![CDATA[
function save_reseller(username){
var type = 'aaa'; // <?php echo $type....
if( type == 'ROOT') {
alert('Eres el Administrador');
}else{
alert('No eres el Administrador');
}
}
//]]>
Saludos