samedi 21 mars 2015

Valor parameter in javascript

i have this



if(valparam[3]==0)
{
if(valparam[4]==1)
{
document.getElementById('cod_htmlbg').value="<iframe src='"+imgcachehtml.src+"' frameborder='0' scrolling='no' width='240' height='580' ></iframe>";
}
else if(valparam[4]==0)
{
document.getElementById('cod_htmlbg').value="<iframe src='"+imgcachehtml.src+"' frameborder='0' scrolling='no' width='240' height='450' ></iframe>";
}
}
if(valparam[3]==1)
{
if(valparam[4]==1)
{
document.getElementById('cod_htmlbg').value="<iframe src='"+imgcachehtml.src+"' frameborder='0' scrolling='no' width='240' height='710' ></iframe>";
}
else if(valparam[4]==0)
{
document.getElementById('cod_htmlbg').value="<iframe src='"+imgcachehtml.src+"' frameborder='0' scrolling='no' width='240' height='580' ></iframe>";
}
}
else document.getElementById('cod_htmlbg').value="<iframe '"+valparam[3]+"' src='"+imgcachehtml.src+"' frameborder='0' scrolling='no' width='240' height='710' ></iframe>";


but when i run it and in my page i change valors for valparam[3] and valparam[4] it works only for valparam[3]==1 && valparam[4]==1 valparam[3]==1 && valparam[4]==0 or for valparam[4]==1 i dont know if it works , i think it prints that last else ....


can someone give me a help ?


Aucun commentaire:

Enregistrer un commentaire