Hey I need some help with this code: <select onchange="document.getElementById('subject').focus(); document.getElementById('subject').value = this.options[this.selectedIndex].value + document.getElementById('subject').value;"> <option selected value="">No Tag</option> <option value="[HELP]">[Help]</option> <option value="[SOLVED]">Solved</option> <select/> Code (markup): At the moment when I select an option the text appears in the text box, but if I select another option with it the text appears in front of the text selected first. E.g "[SOLVED][HELP](Typed text)" I Selected help then solved. I need it to be after the text can any of you help me?????? I've tried changing this: [this.selectedIndex].value + document.getElementById('subject').value Code (markup): To this: document.getElementById('subject').value + [this.selectedIndex].value Code (markup): But means if I type in the box before selecting the options, the options appear after the text I have just typed. E.g "(Typed text)(Selected Options)" BTW its for Phpbb forum Sorry i'm a n00b.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Topic Tags</title> </head> <body> <table width="550px" > <tr> <td width="149">{L_SUBJECT}</td> <td width="550"><form id="form1" name="form1" method="post" action=""> <input name="subject" type="text" id="subject" size="550px" maxlength="84" /> </form> </td> </tr> <tr> <td>Topic Tags</td> <td><select name="Topic Tags" onchange="document.getElementById('subject').focus(); document.getElementById('subject').value = this.options [this.selectedIndex].value + document.getElementById('subject').value;"> <option selected value="">No Tag</option> <option value="[HELP]">[Help]</option> <option value="[SOLVED]">[Solved]</option> <select/></td> </tr> </table> </body> </html> Code (markup):