Did you create this code yourself or did you find instructions for it somewhere?
-- Owen 2010/1/10 Zico <mailz...@gmail.com>: > Hi, i have added a virtual keyboard in my OPAC. I am providing you the code > with which i did it. The procedure i followed: > > I entered my given whole code in Opacheader field. But, the point is: I > cannot input any fonts/data from my keyboard in my OPAC search box. That > means, i cannot use my virtual keyboard to input any data in my search box. > > Here is the complete code: > > " > <html> > <head> > > <style> > .searchform > { > font-size:20px; > width:40px; > text-align:center; > } > > .searchform2{ > font-size:20px; > width:36.6px; > text-align:center; > } > > .space > { > width:160px; > } > > .dari > { > width:80px; > } > </style> > > <script src="http://jquery.com/src/jquery-latest.min.js"></script> > <script src="http://fromvega.com/code/easydrag/jquery.easydrag.js"></script> > </head> > > <body> > > <textarea id="searchform" </textarea> > <br/><input type="button" style="font-size:20px;margin-bottom:20px;" > value="ভার্চুয়াল কিবোর্ড" > onclick="showVk();" /><br/> > <div id="keyb" style="display:none;text-align:center;border:1px solid > #ccc;width:450px;background-color:#FFF;"> > <div id='vktitle' style='position: relative;padding:0px 10px 0px > 10px;font-size:20px;height:40px;line-height:40px;background-color:#444;color:#CCC;text-align:left;'> > > ভার্চুয়াল কীবোর্ড > <div style="position: absolute; bottom: 0.1em; right: > 0.5em;cursor:pointer;" onclick="hideVk();"> > বন্ধ কর > </div> > > </div> > <div id="vkcontainer" style="padding:20px;"> > <div id="vkvowels" style="width:420px;tect-align:center;"> > </div> > <div id="vkkars" style="width:420px;tect-align:center;"> > </div> > <div id="vkconsonants" style="margin-top:15px"> > </div> > <div id="vknumbers" style="margin-top:15px"> > > </div> > <div style="clear:both;"></div> > </div> > </div> > <br/> > > > <script> > > var ir, searchform, banglaSafe=""; > $(document).ready(function(){ > showVirtualKeyboard(); > $('#keyb').easydrag(true); > }); > > var reserved = > "2445,2446,2449,2450,2473,2481,2483,2484,2485,2444,2500,2501,2502,"; > var activeta = "searchform"; > function showVirtualKeyboard(){ > var counter = 0; > for(i=2437; i<=2489;i++) > { > // > ir = reserved.indexOf(i+","); > > if (ir=="-1"){ > searchform = "\\u0"+num2hex(i); > banglaSafe = "&#"+i+";"; > if (i<2453 ) > drawButton(i,"vkvowels"); > else{ > drawButton(i,"vkconsonants"); > counter++; > } > > //$("<input type='button' > onclick='insertAtCursor(\""+searchform+"\")' value='"+searchformSafe+"' > />").appendTo('#consonants'); > > if ( i>2453 && counter>=10) { > $("<br/>").appendTo("#vkconsonants"); > counter=0; > } > } > } > > drawHexButton("\u0995\u09CD\u09B7","vkconsonants"); > drawHexButton("\u09DC","vkconsonants"); > drawHexButton("\u09DD","vkconsonants"); > drawHexButton("\u09DF","vkconsonants"); > drawHexButton("\u09CE","vkconsonants"); > drawHexButton("\u0982","vkconsonants"); > drawHexButton("\u0983","vkconsonants"); > drawHexButton("\u0981","vkconsonants"); > > $("#vkvowels input").attr("class","searchform2"); > $("#vkconsonants input").attr("class","searchform"); > > $("<input class='searchform space' type='button' > onclick='insertAtCursor(\" \")' value='\u09B8\u09CD\u09AA\u09C7\u09B8' > />").appendTo('#vkconsonants'); > $("<input class='searchform dari' type='button' > onclick='insertAtCursor(\"\u0964\")' value='\u0964' > />").appendTo('#vkconsonants'); > $("<input class='searchform space' type='button' > onclick='insertAtCursor(\"\u09CD\")' > value='\u09AF\u09C1\u0995\u09CD\u09A4\u0020\u0995\u09B0\u09C1\u09A8' > />").appendTo('#vkconsonants'); > $("<br/>").appendTo("#vkconsonants"); > > > for(i=2534; i<=2543;i++) > { > searchform = "\\u0"+num2hex(i); > banglaSafe = "&#"+i+";"; > $("<input type='button' > onclick='insertAtCursor(\""+searchform+"\")' value='"+banglaSafe+"' > />").appendTo('#vknumbers'); > } > > for(i=2494; i<=2504;i++) > { > ir = reserved.indexOf(i+","); > > if (ir=="-1"){ > searchform = "\\u0"+num2hex(i); > banglaSafe = "&#"+i+";"; > $("<input type='button' > onclick='insertAtCursor(\""+searchform+"\")' value='"+banglaSafe+"' > />").appendTo('#vkkars'); > } > } > > drawButton("2507","vkkars"); > drawButton("2508","vkkars"); > $("<input class='searchform' type='button' > onclick='insertAtCursor(\"\u09CD\u09AF\")' value='\u09CD\u09AF' > />").appendTo('#vkkars'); > > $("#vknumbers input").attr("class","searchform"); > $("#vkkars input").attr("class","searchform2"); > > > } > function num2hex(num) > { > num = new Number(num); > return num.toString(16); > } > > function hex2num(hex) > { > return parseInt(hex,16); > } > > function drawButton(value, container, cls) > { > //if (cls=="") > searchform = "\\u0"+num2hex(value); > banglaSafe = "&#"+value+";"; > $("<input type='button' > onclick='insertAtCursor(\""+searchform+"\")' value='"+banglaSafe+"' > />").appendTo('#'+container); > } > > function drawHexButton(value, container) > { > $("<input type='button' onclick='insertAtCursor(\""+value+"\")' > value='"+value+"' />").appendTo('#'+container); > } > > function hideVk() > { > $("#keyb").hide("slow"); > } > > function showVk() > { > $("#keyb").show("slow"); > } > > function insertAtCursor(myValue) { > var myField = document.getElementById(activeta); > if (document.selection) { > myField.focus(); > sel = document.selection.createRange(); > sel.text = myValue; > sel.collapse(true); > sel.select(); > } > //MOZILLA/NETSCAPE support > else if (myField.selectionStart || myField.selectionStart == 0) > { > > var startPos = myField.selectionStart; > var endPos = myField.selectionEnd; > var scrollTop = myField.scrollTop; > startPos = (startPos == -1 ? myField.value.length : startPos > ); > myField.value = myField.value.substring(0, startPos) > + myValue > + myField.value.substring(endPos, myField.value.length); > myField.focus(); > myField.selectionStart = startPos + myValue.length; > myField.selectionEnd = startPos + myValue.length; > myField.scrollTop = scrollTop; > } else { > var scrollTop = myField.scrollTop; > myField.value += myValue; > myField.focus(); > myField.scrollTop = scrollTop; > } > } > > > </script> > </body> > > </html> > > " > > Can you please help me? > -- > Best, > Zico > > _______________________________________________ > Koha-devel mailing list > Koha-devel@lists.koha.org > http://lists.koha.org/mailman/listinfo/koha-devel > -- Web Developer Athens County Public Libraries http://www.myacpl.org _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel