Store values using cookie/session on javascript
<p>how can I store this value from hidden field to a cookie/session using javascript</p>

<pre><code>function SelectedRowsHidden() {
                var hiddenField = $("#&lt;%= SelectedRowsState.ClientID %&gt;");
                var selectedValues = "";

                for (var row in selectedRows) {
                    if (selectedRows[row])
                        selectedValues = selectedValues + row;
                }
                //hiddenField.val(selectedValues); //selectedvalues must be stored on cookie or session
                //codes for cookies / session
            }
</code></pre>

<p>after creating cookie / session how will i pass that to another session. <br/></p>

<pre><code>function restoreSelectedRows(){
                //var getRowState = document.getElementById('&lt;%= SelectedRowsState.ClientID %&gt;').innerHTML;
                var getRowState = $("#SelectedRowsState").val(); // gives me undefined value
                $("#jqGrid").jqGrid('setSelection', getRowState, true);
                //code here
            }
</code></pre>

<p>I really dont know how will I achieve this. Thanks</p>
