PDA

View Full Version : cookie to retain moved div position?



TMG
01-28-2008, 12:24 AM
I have the following function on my website and need a way to maintain the moved div positions when the user loads another page. I have looked at various cookie codes available online and tried (without any luck) to adapt them. Can anyone help, or point me in the right direction?

Thanks in advance-
Teri

http://www.artsitedesign.com/teri/bp_iceas3.cfm

function moveObject(){
var object=document.getElementById('todobox');
object.style.position='absolute';
object.style.top=0 + 'px';
object.style.left=0 + 'px';
var object=document.getElementById('contentbox');
object.style.position='absolute';
object.style.top=1 + 'px';
object.style.left=400 + 'px';
object.style.textAlign='left';
}

function MM_moveObject(){
var object=document.getElementById('todobox');
object.style.position='absolute';
object.style.top=0 + 'px';
object.style.left=-400 + 'px';
var object=document.getElementById('contentbox');
object.style.position='absolute';
object.style.top=1 + 'px';
object.style.left=0 + 'px';
object.style.textAlign='center';
}