Hello friends.... my problem is that i have 2 dropdown in which the second drop down will get filled based on the value selected in the first drop down. the values in both dropdown are displayed in malayalam font. i am getting malayalam font in the first drop down, but not in the second one. value is coming in the second drop down but in a different format... some what like this.?\?\? . the value in the second drop down is done using ajax. i am submitting my ajax code here.
i am using the malayalam font MLB-TTRevathi.
please give a solution for this...
[CODE=javascript]var xmlHttp;
//var xmlHttp1;
function GetXmlHttpObjec t()
{
xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest( );
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject(" Msxml2.XMLHTTP" );
}
catch (e)
{
xmlHttp=new ActiveXObject(" Microsoft.XMLHT TP");
}
}
return xmlHttp;
function pvfilltaluk()
{
//if(!checkfrm())
//{
//return false;
//}
if(document.get ElementById("rd 9").checked)
{
return false;
}
var xmlHttp=GetXmlH ttpObject()
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
if (xmlHttp!= null)
{
var str="logicpvtal uk1.php?inputTe xt2="+document. getElementById( 'pvdst1').value +"&option="+ 5;
xmlHttp.open("G ET",str, true);
xmlHttp.onready statechange = setOutput2;
xmlHttp.setRequ estHeader('Cont ent-Type','applicat ion/x-www-form-urlencoded');
//xmlHttp.setRequ estHeader('char set','utf-8');
xmlHttp.send(nu ll);
}
}
function setOutput2()
{
if(xmlHttp.read yState==4)
{
//alert(xmlHttp.r esponseText);
document.getEle mentById('pvdtl k').innerHTML=x mlHttp.response Text;
}
else
{
document.getEle mentById('pvdtl k').innerHTML="----loading---";
}
}
}
[/CODE]
............... ..............
this is my php code for the dropdown 2.
............... ............... ...
[PHP]<?
ob_start();
include "db_connect.php ";
if($_REQUEST['option']==5)
{
$val =$_REQUEST['inputText2'];
?>
<style type="text/css">
<!--
body,td,th {
font-family: Times New Roman, Times, serif;
font-size: 14px;
font-weight: bold;
}
body {
background-color: #D0F9D7;
}
.style1 {width: 164px}
.myclass{font-family:MLB-TTRevathi;font-size:16px; color:#000000; width:164px;}
.style3 {font-size: x-small}
.style7 {color: #990000}
.style8 {color: #0000FF}
.style21 {font-size: 16px; color: #000000; width:164px; }
-->
</style>
<select name="pvtaluk12 " id="pvtk1" class="myclass" >
<option value="">Select Taluk</option>
<?php
$sql="select * from taluk where distcode='$val' order by talukcode";
$rs=mssql_query ($sql,$link);
while($row=mssq l_fetch_assoc($ rs))
{
$pvtkk=$row["talukcode"];
$pvd=$row["distcode"];
$pvta=$row["talukname"];
?>
<option value="<? echo $pvtkk;?>"><? echo $pvta;?></option>
<?
}
?>
</select>
<?
}
?>[/PHP]
i am using the malayalam font MLB-TTRevathi.
please give a solution for this...
[CODE=javascript]var xmlHttp;
//var xmlHttp1;
function GetXmlHttpObjec t()
{
xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest( );
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject(" Msxml2.XMLHTTP" );
}
catch (e)
{
xmlHttp=new ActiveXObject(" Microsoft.XMLHT TP");
}
}
return xmlHttp;
function pvfilltaluk()
{
//if(!checkfrm())
//{
//return false;
//}
if(document.get ElementById("rd 9").checked)
{
return false;
}
var xmlHttp=GetXmlH ttpObject()
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
if (xmlHttp!= null)
{
var str="logicpvtal uk1.php?inputTe xt2="+document. getElementById( 'pvdst1').value +"&option="+ 5;
xmlHttp.open("G ET",str, true);
xmlHttp.onready statechange = setOutput2;
xmlHttp.setRequ estHeader('Cont ent-Type','applicat ion/x-www-form-urlencoded');
//xmlHttp.setRequ estHeader('char set','utf-8');
xmlHttp.send(nu ll);
}
}
function setOutput2()
{
if(xmlHttp.read yState==4)
{
//alert(xmlHttp.r esponseText);
document.getEle mentById('pvdtl k').innerHTML=x mlHttp.response Text;
}
else
{
document.getEle mentById('pvdtl k').innerHTML="----loading---";
}
}
}
[/CODE]
............... ..............
this is my php code for the dropdown 2.
............... ............... ...
[PHP]<?
ob_start();
include "db_connect.php ";
if($_REQUEST['option']==5)
{
$val =$_REQUEST['inputText2'];
?>
<style type="text/css">
<!--
body,td,th {
font-family: Times New Roman, Times, serif;
font-size: 14px;
font-weight: bold;
}
body {
background-color: #D0F9D7;
}
.style1 {width: 164px}
.myclass{font-family:MLB-TTRevathi;font-size:16px; color:#000000; width:164px;}
.style3 {font-size: x-small}
.style7 {color: #990000}
.style8 {color: #0000FF}
.style21 {font-size: 16px; color: #000000; width:164px; }
-->
</style>
<select name="pvtaluk12 " id="pvtk1" class="myclass" >
<option value="">Select Taluk</option>
<?php
$sql="select * from taluk where distcode='$val' order by talukcode";
$rs=mssql_query ($sql,$link);
while($row=mssq l_fetch_assoc($ rs))
{
$pvtkk=$row["talukcode"];
$pvd=$row["distcode"];
$pvta=$row["talukname"];
?>
<option value="<? echo $pvtkk;?>"><? echo $pvta;?></option>
<?
}
?>
</select>
<?
}
?>[/PHP]
Comment