Search bar in html using user input for url redirection -


i wish have search bar goes specific url. have code pasted below, goes image_edit?path={path}. invoked tbox class assume. want path along lines of image_edit/path/index.html. meaning variable inputted user used directly in url , not method variable variable 'path'. in advance help.

edit: better explanation: code below forms form goes url image_edit?path={path} {path} user's input in form. want url image_edit/{path}/index.html instead.

<form style="position: absolute; top: 115px; left: 1165px;" id="quick-search" method="get" action="image_edit">   <fieldset class="search">     <label for="path">search:</label>     <input class="tbox" id="input" type="text" name="path" value="" />     <button class="btn">search</button>   </fieldset> </form> 

why dont use javascript redirect location first, remove action

make event handler onclick on button js function , make redirect :

'image_edit/' +document.getelementbyid('input').value '/index.html'


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -