title: Dynamically set href in iframe not working in Chrome on Android
body: <p>I have a page (jobs.php) which has all the mobile features like call, sms and email. I am accessing this page as an iframe in the main <code>index.php</code> page.
  I have made a function such that before making a call or sms or email, it logs the entry into the database.</p>
  
  <p>jobs.php code</p>
  
  <p>Javascript (all variable are defined and working)</p>
  
  <pre><code>&lt;img src=\""+imgpath+"email_logo.png\"onclick=\"setMailLog('"+installername+"',"+customerId+",'"+email+"')\" id=\"mimg_"+customerId+"\"/&gt;
  
  
  function setMailLog(installerName, customerId,email){
          console.log("Email Attempted:");
      $.ajax({
        url: 'functions.php',
        type: 'POST',
        dataType:'text',
        data: 'elogins='+installerName+'&amp;elogcid='+customerId,
        success: function(result){
          console.log(result);
          $("#mimg_"+customerId).wrap('&lt;a id="mhrefid_'+customerId+'" target="_blank"&gt;&lt;/a&gt;');
          $('#mhrefid_'+customerId).attr('href','mailto:'+email);
          window.location.href=$("#mhrefid_"+customerId).attr('href');
        } 
  
     }); 
  
      }
  </code></pre>
  
  <p>This is working perfectly fine on all desktop browsers. Its working fine on default browser in Android but breaks on Chrome in Android which is important because these are mobile features and should work on mobile device on every browser.</p>
  
  <p>When I click on the mail icon in Chrome on Android, it says</p>
  
  <pre><code>The web page at mailto:email might be temporarily down or it may have removed permanently to a new address
  
  Error 302(net::ERR_UNKNOWN_URL_SCHEME): Unknown error
  </code></pre>
  
  <p>The error page shows up only in particular iframe and not on the whole index.php file.</p>
  
  <p>Call and sms functions the same way, just the error changes to <code>tel:5225</code> or <code>sms:5114</code></p>
  
  <p>This is all in an iframe, may be that's what causing the problem?</p>