Expand my Community achievements bar.

AEM6.3 post request on submit on form target="_blank"

Avatar

Level 8

Hi ,

I have a page were we can select assets. After selecting assets on submit we do a get request to new url with the path of the asset.

Now i would want to know how could a post request to new url with the asset path ,as when tried changing to method post the action page does not fails to load and shows an error.

<script>

jQuery(document).ready(function(){

    $("#submitBtnForBulkEditor").click(function(){ 

     var favorite = [];

            $.each($("input[name='select_field_list_man']:checked"), function(){

                favorite.push($(this).val());

            });

$("#assetsNeedBulkUpdateId").val(favorite);

        $("#bulkeditortaggingform").submit(); // Submit the form

    });

});

</script>

<form action="/content/test.html" method="get" id="bulkeditortaggingform" target="_blank">

    <input type="hidden" id="assetsNeedBulkUpdateId" name="assetsNeedUpdate" value="">

        <button type="button" id="submitBtnForBulkEditor">Submit Form</button>

</form>

0 Replies