Using Javascript to fill variable, display image

I have a text input box that I want to enter a word into and then click submit.
Upon clicking submit, the word that was entered into the box will add itself into the following string:

http://ichart.finance.yahoo.com/z?s=HERE IS THE VARIABLE&t=1y&q=l&l=on&z=m&p=e20,e50,e200&a=v,m26-12-9,r14,ss

This will then be used to display the image on the page.

Ideas?