Hi,
I have a div control on an aspx page. I toggle the display property between
'block' and 'none' client side using the following javascript:
function toggleDivOnOff(divID) {
var x = document.getElementById(divID)
x.style.display == 'block'? x.style.display='none' : x.style.display='block';
}
In the code behind page, I want to use the value of the display property to
decide on an action to be taken using the following:
if (mydiv.Attributes.CssStyle["display"] == "block")
{
//do something
}
However, it would seem that although I can alter the way the div is
displayed on the aspx page either via the javascript or using code behind (
e.g. mydiv.Attributes.CssStyle["display"] = "block";), the code behind seems
not to recognise changes made in the javascript . Is there a way of
referencing the display property in the code behind in such a way as to avoid
this problem?
Many thanks,
Pete