0

i want to call the default_cat() for another process, but i want it by clicking the anchor from the other page?

<a href="example.com/menu2/('default_cat()')">VIEW DETAILS &#x226B</a>

but not working.

function default_cat() {
    $.ajax({
        url: '<?=base_url();?>menu2/prod_category/1',
        method: "post",
        success: function(data){
            $(".tab-panes").html(data);
            $("#menu-text-a").focus();
        } 
    });
}
Arunjith R S
  • 792
  • 12
  • 23
VinceGraphic
  • 85
  • 1
  • 9

1 Answers1

0

The reason this doesn't work, is because of security concerns. The correct way to do this is to have the function on your first page.

gcoreb
  • 181
  • 5