lundi 21 mars 2016

Rss token in laravel ajax

In an laravel 5.1, I'm using more than one Ajax in an single page, in this situation can i use one rss token for an all Ajax?

Its working or not???

<script type="text/javascript">
                function show_codes(a){
                var l = $('#rss_token').val();
                $.ajax({
                url: 'codegen',
                type: "post",
                data: '&cat_id='+a+'&token='+l,
                success: function(html) {
                $('#product_code_out').html(html);
                }
                });      
                }

                function inventory_left_to_right()
                {
                alert('The Title l_R');
                var l = $('#rss_token').val();
                $.ajax({
                url: 'codegen',
                type: "post",
                data: '&cat_id='+a+'&token='+l,
                success: function(html) {
                $('#product_code_out').html(html);
                }
                });      
                }
</script>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire