View Single Post
  #3 (permalink)  
Old April 23rd, 2007, 04:12 AM
mona_1dec mona_1dec is offline
Registered User
 
Join Date: Apr 2007
Location: Pune, Maharashtra, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mona_1dec
Default

Thanks,
  But now I want to store 1 if checked and 0 if not. i.e. if I have 5 checkboxes and is I check 1st and 3rd checkboxes then I should have it in the form 10100.. and I want to store it in database..

  I used a javascript code in my jsp page to check status of checkboxes.. but I dont know how to return this string to ActionForm..

function checkStatus()
        {
         wday=document.forms[0].wday
         weektxt=""
         for (i=0;i< wday.length;++i)
           {
            if (wday[i].checked)
             {
              weektxt=weektxt + 1
             }
            else
             {
              weektxt=weektxt + 0
             }
           }

         mday=document.forms[0].mday
         monthtxt=""
         for (i=0;i< mday.length;++i)
           {
            if (mday[i].checked)
             {
              monthtxt=monthtxt+ 1
             }
            else
             {
              monthtxt=monthtxt + 0
             }
           }
          return weektxt;
          return monthtxt;
        }

can u plz help me? or if there is some another way plz suggest.
Thanks in advance.

Monali Swarge