troubleshooting Question

Javascript question

Avatar of Richard Korts
Richard KortsFlag for United States of America asked on
16 Comments1 Solution42 ViewsLast Modified:
Please look at this code:

   steps = "<? print $_SESSION['use_steps']; ?>";
   user = <? print $_SESSION['user']; ?>;
   fname = "<? print $fname; ?>";
   fnue = "<? print $fnue; ?>";
   ac = "";
   fr = "<? print $fr; ?>";
   ems = "<? print $_GET['ems']; ?>";
   loc = "<? print $loc; ?>";
   function open_pdf_win() {
      str = loc + fname;;
   function ask_email() {"email_pdf_new.php?f=" + fnue);
      if (steps) {
         window.location = "choose_property_us.php?prop=" + fname;
      } else {
         window.location = "choose_property.php?prop=" + fname;
   <body onLoad="ask_email();open_pdf_win();">


This is at the end of a php script. The javascript function ask_email() used to have a confirm asking if the email should be sent. The customer asked that I change it so that the email is always sent, so it looks like this.

When I test it from my computer, it works fine. The customer says it does NOT work form him, using an iPad. I am wondering if there might be an issue with the self.close() occurring too quickly if no confirm to stop processing until the user answers is present. Or other issues?

Thank you.
Join our community to see this answer!
Unlock 1 Answer and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros