I have a print button and when it is clicked the following JavaScript function must be triggered.
$('.print').click(function(){
var htmlval=$('.pop_reciept').html();
window.open('http://localhost/ccccccc/xxxxxxx/pdf/'+htmlval,'_blank');
});
htmlval
contains the HTML of elements with the class pop_reciept
, and then I pass this to the pdf
controller:
public function pdf($val){
echo $val;
return false;
}
I want the HTML content need to displayed. But it is not, and instead I see the error
The URI you submitted has disallowed characters.
Please help or suggest a better way to do this.