1

jQuery(document).ready( function () { jQuery("#edit-suspension").change(function() { var basepath = Drupal.settings.basePath; var key = jQuery(this).val();

      //alert(key);
  jQuery.ajax({
           type:'POST',   
           url: basepath+ "custom_menu",
           data : {output:key},
            success:function(data)
            {
                     jQuery('#content').html(data);
              }  
        });
    });

how to get the output value in the menu function using $_POST method

2
  • Why you are writing javascript when you can use #ajax to your form element? Mar 29, 2016 at 7:15
  • yeah but i am trying to do in JavaScript . And also i got output for this by using $_post; Answer is $_POST['output'] Mar 30, 2016 at 14:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.