Add character to a field name with special char's

Discussion in 'JavaScript' started by grasshopper168, Sep 19, 2006.

  1. #1
    Hi,

    I new to this forum and havn't done alot of Javascript.

    Could some one tell me how to do this

    I have a text form field with a '*' in it
    <input name="mail_subject*" type="text" size="40" maxlength="50">

    I want to add a word like 'subject' to the front of the field like this

    document.contact.mail_subject*.value = 'Subject - ' + document.contact.mail_subject*.value

    but it doesn't like the * in the field name.

    Can some one tell me how to do it.

    Thanks
     
    grasshopper168, Sep 19, 2006 IP