ultra simple code: why is not popping the alert window?
- I click on an 'a' link tag and the value does get passed to the var selectedlanguage, but then continuing down the code, the "alert" does not pop when supposedly returning from the Controller. Looks like it does not get this far.
-
-
- <script>
- $(document).ready(function(){
- $('.choose-language').on('click', function()
-
- {
- var selectedlanguage = $(this).data('value');
- $url = '{{URL::route('languagechooser')}}';
- $.post($url,
- {'locale': selectedlanguage},
- function(data){
- alert("hello");
-
- }); // HERE FINISHES THE $.POST STUFF
-
- }); //HERE FINISHES THE CLICK FUNCTION
-
- }); // HERE FINISHES THE DOCUMENT AND READY STUFF
- </script>