jquery - bootstrap link in modal doesn't open new window -
i create dynamically modal , set dynamically href attribute of link in modal. (i cant set href when create modal)
if click on button doesn't open link of button
my button shown in modal
<a data-temp_code="123456" class="btn btn-sm c_button js-printpdf-offer" type="button" target="_blank" href="http://someurl.com/docs/getarticle.php?code=123456"><i class="glyphicon glyphicon-print"></i> open link</a>
anybody know problem?
i created jsfiddle , there works , dont know why?!
i have "click" - event on link too... comment out , after works... don't know why?! code of click event?
$(document.body).on('click', '.js-printpdf-offer', function(event) { event.preventdefault(); if($('#onlyinternmodal.in').length > 0) { $('#onlyinternmodal.in').modal("hide"); } var temp_code = $(this).data("temp_code"); var make = $('.js-hersteller').val(); var model = $('.js-typ').val(); var model_id = $('.js-model-id').val(); var caption = ''; $.ajax({ type: "post", url: "ajax/saveaction.php", data: { temp_code:temp_code, make:make, model:model, model_id:model_id, caption:caption, }, success: function(data) { } }); });
Comments
Post a Comment