I have a JQM-site that generates a pdf-file when submitting a form. All that is working fine, but I have a problem with the pdf not opening in a new window(open safari..) when started from home screen on iPhone.
It seems that I'm not the only one having problem with this, but I havn't found a working solution yet. I have no problem opening a new window in safari if I link to a static pdf with an anchor tag. My conclusion is that if I submit my form with an anchortag everything will work..!
However when i try with the following code the result is just the same as if I post my form with a regular submit button.
Can anyone please help me with another solution? Or maybe tweak this so that it works?
This is my form:
<form name="pdf" action="pdf_report1.php" data-ajax="false" target="_blank" id="pdf_report" method="POST">
<input type="hidden" name="customer_id" value="<?php echo $customer_id; ?>" >
<input type="hidden" name="date_from" value="<?php echo $date_from; ?>" >
<input type="hidden" name="date_to" value="<?php echo $date_to; ?>" >
<input type="hidden" name="user_id" value="<?php echo $user_id; ?>" >
<input type="hidden" name="maskin_id" value="<?php echo $maskin_id; ?>" >
<input type="hidden" name="akeri_id" value="<?php echo $akeri_id; ?>" >
<input type="hidden" name="littra_id" value="<?php echo $littra_id; ?>" >
<a href="javascript: document.getElementById('pdf_report').submit();" data-role="button">Create PDF</a>
</form>