1 Replies - 1087 Views - Last Post: 06 December 2012 - 06:36 AM

#1 ssureshtmj  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 05-December 12

For loop two same dropdown list to populate 2 textbox in javascript

Posted 06 December 2012 - 02:39 AM

i need billing program in php.
so i known only one dropdown to get populate only one textbox..

so i donot know about for loop of two same dropdown list to get populate two textboxes values.

see below program..

please send me correct program needly.

<?php
for($i=1; $i<= 2; $i++)
{
?>

<form method="post">
<input type="text" name ="mt['$i]" id='mytext["$i"]' >
<select name = "drop" id='dropdown'>

<option value="">None</option>
<option value="Hai">Hai</option>
<option value="Good">Good</option>
<option value="Comedy">Comedy</option>
<option value="Ready">Ready</option>
</select>

<script type="text/javascript">
		var mytb = document.getElementById('mytext["$i"]');
		var mydropdown= document.getElementById('dropdown');
		mydropdown.onchange = function()
		{
				mytb.value = this.value;
		
		}

</script>
<?php
}
?>
</form>


Reply me soon...

This post has been edited by Dormilich: 06 December 2012 - 04:09 AM
Reason for edit:: please use [CODE] [/CODE] tags when posting code


Is This A Good Question/Topic? 0
  • +

Replies To: For loop two same dropdown list to populate 2 textbox in javascript

#2 Anthonidas  Icon User is offline

  • D.I.C Head

Reputation: 30
  • View blog
  • Posts: 218
  • Joined: 25-April 11

Re: For loop two same dropdown list to populate 2 textbox in javascript

Posted 06 December 2012 - 06:36 AM

View Postssureshtmj, on 06 December 2012 - 10:39 AM, said:

please send me correct program needly.

.................

Reply me soon...


Wooow... I'm sure everybody will send you the fully functional code, after your request. Some will also send you some money :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1