Hi all
i want to manipulate a session variable in page onload function. the variable is an enumeration. here is the example code
function pageload(){
<% itemEnum=(Enumeration) session.getAttribute("addedItems"); %>
if( <%= itemEnum%> == null)
alert("Null");
else
alert("notnull");
}
the first time the page loads(the enumeration is null) it works fine i.e. alert("null")
when the form is submitted to a
servlet, the enumeration gets a value and request redirected to this page again and than it shows a javascript error of
Object Expected for itemEnum i think.
plz any one help me out with it.
thanks
Gul