ReportingAnalyst
MIS
Hi,
Has anybody worked with this kind of scenario? I am working on a hierarchial tree which I can expand and collapse. However when I submit the form elements and come back to this page, the tree is collapsed and then I cannot see the element which I selected until I expand the tree again to see my prior selection.
I am working on this, but do not know what I am missing.
Has anybody worked with this kind of scenario? I am working on a hierarchial tree which I can expand and collapse. However when I submit the form elements and come back to this page, the tree is collapsed and then I cannot see the element which I selected until I expand the tree again to see my prior selection.
I am working on this, but do not know what I am missing.
Code:
function s_Hide(el){
obj = document.getElementById(el).style;
(obj.display == 'none')? obj.display = 'block' : obj.display = 'none';
get_cookie(Name);
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
window.onLoad = get_cookie(Name);