PDA

View Full Version : Here coding to trouleshoot



cute
05-16-2007, 07:41 AM
hi all,

i'm developed an application using javascript like 'Character Map' in windows
in Character map only one text box is there.but i'm using my application for my web page.in that lot of text boxes.for that if i focus the textbox then my application should give the value to the corresponding textbox .i want to get the value from my application to the corresponding text box.

how to put values from my application?My application is in separate html file.whenever i focus any of the text box my application(Separate html file) should execute for that text box only.

how this is possible?
help me plz.......
It works well for Single text box.
here my application sample coding.....
In this TB1 and TB2 are two textboxes.whenever i focus on TB1 the code will work for TB1.if i focus TB2 the code will work for TB2. how to achieve this.help me soon plz...

can any one help me
<html>
<head>

<script type="text/javascript">
function putValueInTextBox(giver, taker)
{
document.getElementById(taker).value +=giver.value;
}
</script>
<script type="text/javascript">



</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>


<input id="TB1" type="text" size="20" maxlength="150" >
<input id="TB2" type="text" >

</form>
<br><br>


<table width="174" border=1 cellpadding="0" cellspacing="0" bordercolor="#000080" dir="ltr" style="border-collapse: collapse;" height="175">



<tr>

<td width="39" align="center" height="23">
<input name="b10" type="button" onclick="putValueInTextBox(this,'TB1')" value="ஃ" style="background-color:#FFFFFF; border:thin none;width:23; height:23">&nbsp;</td>
<td width="34" align="center" height="23">
<input name="b10" type="button" onclick="putValueInTextBox(this,'TB1')" value="அ" style="background-color:#FFFFFF; border:thin none;width:18; height:18">&nbsp;</td>
<td width="34" align="center" height="23">
<input name="b10" type="button" onclick="putValueInTextBox(this,'TB1')" value="ஆ" style="background-color:#FFFFFF; border:thin none;width:24; height:24">&nbsp;</td>
<td width="34" align="center" height="23">
<input name="b10" type="button" onclick="putValueInTextBox(this,'TB1')" value="இ" style="background-color:#FFFFFF; border:thin none;width:20; height:20">&nbsp;</td>
<td width="35" align="center" height="23">
<input name="b10" type="button" onclick="putValueInTextBox(this,'TB1')" value="ஈ" style="background-color:#FFFFFF; border:thin none;width:20; height:20">&nbsp;</td>
<td width="34" align="center" height="23">
<input name="b10" type="button" onclick="putValueInTextBox(this,'TB1')" value="உ" style="background-color:#FFFFFF; border:thin none;width:22; height:22">&nbsp;</td>

</tr>
</table>

</body>
</html>

codeexploiter
05-16-2007, 08:45 AM
It is better if you give either a link or source for the troubleshooting.