Use a variable with submit button

Use a variable with submit button

Hello everybody,

I want to create a form which opens, depending which option is selected a new window with a variable which has been typed into a text field before:

  1. departure from:
  2. <input type='text' name='from' />
  3. transportation:
  4. <select id='item_select' name='item'>
  5.  <option value='1'>car</option>
  6.  <option value='2'>train</option>
  7. </select>
  8. open route in new window:
  9. <input type='checkbox' name='checkbock' value='checked' />

How can I either open onlick the submit button a new window with the variable "from" in the link (if the option "open in new window" is selected) or just send the form normaly if the option is not selected?

Thanks for every help!

Scott