Enable / Disable multiple virtual keyboard

26 views
Skip to first unread message

noushad mullungal

unread,
Jul 27, 2013, 2:24:08 AM7/27/13
to google-ajax...@googlegroups.com
How can use google virtual keyboard to multiple textboxes. I want a checkbox is checked placed above the each textbox to enable virtual keyboard.
I done using this code:
I have two textboxes and checkboxes named textbox1,checkbox1,textbox2 and checkbox2. 

        
       var kdp1;var kdp2;
        
         /* This function for checkbox1 for enabling keyboard on textbox1*/
         function checkbox1(chk)
         {
          if(chk.checked)
          {
            kdp1=new google.elements.keyboard.Keyboard(
                        [google.elements.keyboard.LayoutCode.MALAYALAM_PHONETIC],
                        ['textbox1']);
          }
         else
         {
          kdp1.setVisible(false);
         }
        }
              // This function for checkbox2 for enabling keyboard on textbox2
        function checkbox2(chk)
        {
         
         if(chk.checked)
         {
           kdp2=new google.elements.keyboard.Keyboard(
                        [google.elements.keyboard.LayoutCode.MALAYALAM_PHONETIC],
                        ['textbox2']);
         }
         else
         {
           kdp2.setVisible(false);
         }
        }
        
This enable virtual keyboard on each textbox when checkbox is checked. But problem is when I uncheck the chekbox of one textbox it also hide every virtual keyboard. I want to hide only one virtual keyboard. How can I solve this problem. 
Reply all
Reply to author
Forward
0 new messages