CreativeMind a écrit :
thx.
error message is no more raising.
>As for the error you're seeing. If you post the Javascript that's
generating this error, we'll have a better chance of helping you
----
but i can't my dropdownlist values in IE.
here is complete info.
<select name="cboUnitTypes" onchange="javascript:return
ConfirmDeleteImage();__doPostBack('cboUnitTypes',' ')"
language="javascript" id="cboUnitTypes"
class="TextFieldNormalForProperty" style="width:200px;">
</select>
I am working for IE, not for Firefox.
... ????? ...
Poor IE ! and poor Opera !
<script type='text/javascript'>
function ConfirmDeleteImage()
{
var result;
var cbo = document.all?
document.all['cboUnitTypes'] :
document.getElementById?
document.getElementById('cboUnitTypes') :
document.myForm.cboUnitTypes;
if (cbo.options.length <= 0) return false;
if (document.all) {
var hide = document.all['lblHiddenUnitType'];
if( hide.value != null && hide.value 0 )
{
result= confirm('Existing Image(s) will be replaced with the '+
'new one(s).\nDo you want to continue?');
if(result == false)
{
cbo.onchange = null;
cbo.value = hide.value; // that works with IE ?
// cbo.selectedIndex = hide.value;
cbo.onchange = ConfirmDeleteImage;
}
else
{
cbo.onchange = null;
hide.value = cbo.value;
cbo.onchange = ConfirmDeleteImage;
__doPostBack('cboUnitTypes',''); // doPostBack will no more
// be in the onchange
}
return result;
}
else
if (hide.value != null)
{
alert('what do you want to do ?');
}
}
}
</script>
version #2 :
<script type='text/javascript'>
function ConfirmDeleteImage()
{
var cbo = document.all?
document.all['cboUnitTypes'] :
document.getElementById?
document.getElementById('cboUnitTypes') :
document.myForm.cboUnitTypes;
if (cbo.options.length <= 0) return false;
if (document.all) {
var hide = document.all['lblHiddenUnitType'];
if( hide.value != null)
{
hide.value = cbo.value;
if( confirm('Existing Image(s) will be replaced with the '+
'new one(s).\nDo you want to continue?') )
{
cbo.onchange = null;
cbo.onchange = ConfirmDeleteImage;
__doPostBack('cboUnitTypes',''); // doPostBack will no more
return true; // be in the onchange
}
cbo.onchange = null;
cbo.selectedIndex = hide.value;
cbo.onchange = ConfirmDeleteImage;
return false;
}
}
}
</script>
--
sm