First problem with your script, you are missing a ; on line 24.
Second problem, you haven't created a var called xtra which you try to use on line 31.

Also, why are you mixing DOM standard with innerHTML?

Lastly, this appears to be JavaScript, not PHP. For future reference, there is a JS forum here: Click.

ok, apparently if you are referring to my first post the code works fine even with problem one and two with Mozilla. When i used the second post's code with IE, i realized i need to solve problem one and two, and hence my third post. I got first post's code off somewhere so i don't know about problem "also". And deepest and sincere apologies for not knowing that this a PHP or JS problem by my first post, I have make a new thread http://www.daniweb.com/forums/post1098769.html#post1098769 to solve problem "lastly", and marked this thread as solved. Cheers.