can not store values in cookies

Discussion in 'JavaScript' started by goutam.dutta123, Oct 25, 2007.

  1. #1
    Hello experts,

    I want to store the values of my checkboxes into cookies when checked.
    here is my code:

    function keepID(value)
    {
    i = 0;
    var ca = document.cookie.split(';');
    for(i=0;i<<?php echo $_SESSION['row'] ?>;i++)
    {
    if(document.myform.chkID.checked==true)
    {
    ca=value;

    }
    }

    }
    My checkboxes are moving in a loop:
    <input type="checkbox" name="chkID[]" id="chkID" value="<?=$rowSubjects['ID']?>" onClick="keepID(<?=$rowSubjects['ID']?>)">
    Please help....

     
    goutam.dutta123, Oct 25, 2007 IP