• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

116
Views
Open pdf in new tab upon page loading

After submitting a form, the user is taken to a thank you page. On this page I create a variable containing the url to a specific floor plan they selected from the form.

$floorplan = $_POST['cm-f-djuiyhkr'];

I then want to open this floorplan pdf in a new tab after the thank you page has loaded. Currently this is what I have at the bottom of my document

    <script>
$(document).ready(function(){
    window.setTimeout(function(){
        var link = '<?php echo $floorplan ?>';
        var newTab = window.open(link, '_blank');
    }, 5000);
});
}
  </script>

Obviously it's not working, and I am not good enough with code to debug it. I assume it is trouble mixing JS and PHP

about 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error