javascript - redirect to same page after submit -


i want submit form when file select changed in form , able redirect same page.

ie: have url: http://localhost:3000/worker_steps/basic_info. after dropdown changed, want form submitted , redirect again http://localhost:3000/worker_steps/basic_info.

i have code in html:

<form class="simple_form form-horizontal" novalidate="novalidate" id="edit_user_385" enctype="multipart/form-data" action="/worker_steps/basic_info" accept-charset="utf-8" method="post"> <input class="file optional" name="user[picture]" id="user_picture" type="file">  //this th e dropdown select input 

and in jquery, have atm:

$("#user_picture").change(function(){ //window.location = "/worker_steps/basic_info"; $(this).closest("form").submit();     }); 

i use this:

window.location.replace(window.location.href); 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -