[Javascript] web form input type name display alert

Hassan Schroeder hassan at webtuitive.com
Fri Mar 1 14:59:22 CST 2002


dont worry wrote:

> I use under scores in the naming conventions
> <input type="text" name="ANSWER_1_CAR_COLOR">
> 
> When the alert box displays name can I have it remove
> the under scores?  So we get ANSWER 1 CAR COLOR?

  alert(('ANSWER_1_CAR_COLOR').replace(/_/g,' '))

Sample only :-) -- replace 'explicit string' with your variable name ...

HTH!
-- 
H*
Hassan Schroeder ----------------------------- hassan at webtuitive.com 
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

    -- creating dynamic Web sites and applications since 1994 --



More information about the Javascript mailing list