i am creating two text areas with id's-id11 and id12..what i want is that as soon as user changes the text of any ofthese text areas it should display that text in an alert box.Here is my code:
echo '<textarea id="id1$i" onchange=Display("id1$i")></textarea>';
echo "id1$i..<br>";
<input name="Submit" type="submit" value="Submit"/>
function Display(id1$i)
Now when i try running this...the problem is when i enter "one" in the first text area box,it displays "one",that's ok.....but when i enter "two" in the second text area box,it still displays "one"......

The only reason dat i can think of why it's hapning lyk dat is the function Display(id1$i) is not taking the value of $i=2...please help!!..

If i use proper names like "id11" and "id12"(i.e i dont use the variable $i anywhere in my code or say if i harcode everythng)..then the code works fine..it displays both "one" "two",respectively..