Mini Javascript Form Submit

I would like to put a simple form in the header that appears across the board and does something very simple:

  • a textfield

  • a button

When clicking the button take me to

… where xyz is the value entered in the textfield.

your script should be like this


                  url = '<?php Yii::app()->createUrl('url-path');?>';

                  val = $('your-textfield').val();

           		window.location.href = url + "/" + val;