11484 sujets

JavaScript, DOM et API Web HTML5

j'ai un paramétrés par défauts sur ma page aspx
quand je clique sur un e donnée dans ma carte interactive , ma page s'ouvre mais avec la valeur par défaut que j'ai donné
par contre dans internet explorer ça marche

//<SCRIPT src="BNDG/JavaScript/OpenIT.js" type=text/javascript></SCRIPT>
function doNavigate(application)
{
//var profil = '<%=Session["PROFIL"]%>';
//var token = '<%=Session["TOKEN"]%>';

//HttpSession session = response.get
var profil = session.getAttribute("PROFIL");
var token = session.getAttribute("TOKEN");
if ( token == '' )
alert('Vous devez être connecté pour lancer cette application');
else
{
// POST pour ne pas afficher le token
var applicationForm = document.getElementById('application');
applicationForm.action = application + '/default_' + profil + '.aspx';
applicationForm.submit();
}
};
function doNavigateAll(application)
{
var profil = '<%=Session["PROFIL"]%>';
var token = '<%=Session["TOKEN"]%>';
if ( token == '' )
alert('Vous devez être connecté pour lancer cette application');
else
{
// POST pour ne pas afficher le token
var applicationForm = document.getElementById('application');
applicationForm.action = '../BNDG/ouvrirFiche.aspx?LAYER=' + application ;
applicationForm.submit();
}
};

//"Javascript: openIT('LAYER=Cartogramme 1/200 000&ID=C2C0062');";
function openIT(theURL)
{
// setup test for Nav 4.0
var isIE = false;
var isIE6 = false;
var is5up = false;

var isNav = (navigator.appName.indexOf("Netscape")>=0);
var isNav4 = false;

var W = 850
var H = 800
var X = null
var Y = null
var wname = "Fiche"
//theURL = "../bndg/ouvrirFiche.aspx?" + theURL
theURL = "../ouvrirFiche.aspx?" + theURL


if (isNav)
{
if (parseFloat(navigator.appVersion)<5)
{
isNav4=true;
}
}
else
{
isIE=true;
if ( navigator.appVersion.indexOf("MSIE 6") > 0 )
{
isIE6 = true;
}
}

var s = 'dependent=yes,resizable=yes,scrollbars=yes,directories=no,location=no,menubar=no,personalbar=no,status=no,toolbar=no';
s = s + ",width=" + W;
s = s + ",height=" + H;
if (X==null) X=Math.ceil( (window.screen.width-W)/2 );
if (Y==null) Y=Math.ceil( (window.screen.height-H)/2 );

var theWin = open(
theURL,
wname,
s
);
theWin.moveTo(Math.ceil(X),Math.ceil(Y));
theWin.focus();
};

merci