html - redirect including input type value at submit form -


any thoughts why redirect doesn't work @ form submit? should redirect user url specified in js function, appending value input form

 <form>                             <div class="input-wrap">                                 <input type="text" id="myinputtype" class="block"  />                                 <input type="submit" name="submit" class="block" onsubmit="redirect()" />                             </div>  </form>  ` <script type="text/javascript">     function redirect() {         window.location = 'http://somewhere.com?url=' + document.getelementbyid('myinputtype').value;     } </script> 

i think onsubmit='' goes form tag <form onsubmit="redirect();"> not on input


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -