Hey I need some help with this code: <!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): 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.
make it subject = subject + option (as shown below) <select name="Topic Tags" onchange="document.getElementById('subject').focus(); document.getElementById('subject').value = document.getElementById('subject').value+this.options [this.selectedIndex].value;"> Code (markup):
I have tried this but if someone types in the subject in first the topic tags are added after what they just typed not before. E.g "(typed subject)[HELP][SOLVED]"
Actually, I didn't get what exactly you want! You want the TAG to be in front of the Typed Text or before?
In front of the typed text, but if I add another tag I want it to be after the first tag. e.g "(typedtext)" "(First tag added)(typedtext)" "(First tag added)(second tag added)(typedtext)" Get it?