gyhuang33
06-08-2008, 01:58 PM
Hello all
Sorry to bother you again. I have something like this:
<select id="playerList" name="playerList" size="10" style="width: 6cm"></select>
I want to update this part using information from server. I am using ajax.
I used this code in javasrcipt to update it:
document.getElementById("playerList").add(data);
However, it doesnot work.
Also, how to get which "player" is clicked using javascript
Because I am a newbie, I even do not know whether I should use <select> here. Basically, I want to dynamically update a player list, client can choose one player or many players to do some specific task. So, I want to know how to update it and how to select it.
Thanks.
Sorry to bother you again. I have something like this:
<select id="playerList" name="playerList" size="10" style="width: 6cm"></select>
I want to update this part using information from server. I am using ajax.
I used this code in javasrcipt to update it:
document.getElementById("playerList").add(data);
However, it doesnot work.
Also, how to get which "player" is clicked using javascript
Because I am a newbie, I even do not know whether I should use <select> here. Basically, I want to dynamically update a player list, client can choose one player or many players to do some specific task. So, I want to know how to update it and how to select it.
Thanks.