MyBB Community Forums

Full Version: I add a key board Selector
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am Add a key board selector in my forum. I give picture of it. 1st see the picture and then i enplane what kind of help i need. After Please give me solutions for this.
[attachment=12315]

I am add this code on new thread page:
<fieldset>
	<legend>টাইপিং পদ্ধতি</legend>
	
	<label class="kblayout"><input name="optbangla" type="radio" value="radiobutton" onclick="makeUnijoyEditor('req_message');makeUnijoyEditor('req_subject');switched=false;Set_Cookie('layout','unijoy','30','/','');"  /> 
	Unijoy </label> :: 
	<label class="kblayout"><input name="optbangla" type="radio" value="radiobutton"  onclick="makePhoneticEditor('req_message');makePhoneticEditor('req_subject');switched=false;Set_Cookie('layout','phonetic','30','/','');"  />
	Phonetic</label> :: 
	
	<label class="kblayout"><input name="optbangla" type="radio" value="radiobutton"  onclick="makeProbhatEditor('req_message');makeProbhatEditor('req_subject');switched=false;Set_Cookie('layout','probhat','30','/','');"  />
	Probhat </label>:: 

	<label class="kblayout"><input type="radio" name="optbangla" id="optbangla" value="english" onclick="Set_Cookie('layout','english','30','/','');switched=true;" checked="checked" />
	English</label>
</fieldset>
<br/>

I also A java Script code in header included page. This code is :
<script type="text/javascript">
<!--
function process_form(the_form)
{
	var element_names = new Object()
	element_names["req_email"] = "ইমেইল" //ইমেইল = email
	element_names["req_subject"] = "বিষয়" // বিষয় = Thread Subject
	element_names["req_message"] = "বার্তা" // বার্তা = Your massage

	if (document.all || document.getElementById)
	{
		for (i = 0; i < the_form.length; ++i)
		{
			var elem = the_form.elements[i]
			if (elem.name && elem.name.substring(0, 4) == "req_")
			{
				if (elem.type && (elem.type=="text" || elem.type=="textarea" || elem.type=="password" || elem.type=="file") && elem.value=='')
				{
					alert("\"" + element_names[elem.name] + "\" is a required field in this form.")
					elem.focus()
					return false
				}
			}
		}
	}

	return true
}
// -->
</script>
But it is not working and this cause i am post it here for finding a good solutions.


Now I Want When I click the UNIJOY Radio Button the key board layout change English to bangla unijoy key board and also other radio button same(AS a result i will able to write bangla Thread Subject and Your Messages in Bangla Key Board) And When i click English radio button key board layout change to English.
Another how can i Overriding the $-function for making prototype compatible.