maybe because you are changing the window.location before the form submit is even completed.
I commented out the line 'window.location =wl;' and works fine! So alainbelez you were right! Thanks! I suppose it's for the reason you mentioned. But how can I redirect the window after the form is submited? (with javascript)
Maybe there is some way to pass a variable from my javascript function to my controller?
I added a hidden text box in the form:
{{ Form::text('txtRedirect', 'secret',array('id'=>'txtRedirect')); }}
I set it's value in my javascript function:
document.getElementById('txtRedirect').value='true';
I get it's value in the controller:
$redirect=Input::get('txtRedirect');
It works fine!!!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community