document.write (" | <a href = 'myhomepage.asp?
view=mhp&action=save&pb=");
document.write (document.phone.style.display.value);
document.write ("'>save view</a>");
};
creates an error at this (>) line.
function showhide (item) {
var objid = document.getElementById(item);
var imgid = document.getElementById(item+'i');
var imgidMinusSrc = '/images/furniture/minus.gif';
var imgidPlusSrc = '/images/furniture/plus2.gif';
if (objid.style.display == 'inline') {
objid.style.display = 'none';
imgid.src = imgidPlusSrc;
if (item == 'hpleftcolhl') {
objid.style.width = '4px';
document.getElementById('hpleftcol').style.width = '6px';
document.getElementById('showtime').style.display =
'none';
}
}
else {
objid.style.display = 'inline';
imgid.src = imgidMinusSrc;
if (item == 'hpleftcolhl') {
objid.style.width = '160px';
document.getElementById('hpleftcol').style.width =
'160px';
document.getElementById('showtime').style.display =
'inline';
}
}
};
this one however works fine, and both use the same object?
I've tried using document.getElementById('phone').style.display
but with same result.
now, the saveState function is simply some inline script to build an <a
href> , whereas the showhide one is triggered from an onclick.