電話、SMS、メールなどのすべてのモバイル機能を備えたページ(jobs.php)があります。メインページのiframeとしてこのページにアクセスしていindex.php
ます。電話、SMS、または電子メールを送信する前に、エントリをデータベースに記録するような機能を作成しました。
jobs.phpコード
Javascript(すべての変数が定義されて機能しています)
<img src=\""+imgpath+"email_logo.png\"onclick=\"setMailLog('"+installername+"',"+customerId+",'"+email+"')\" id=\"mimg_"+customerId+"\"/>
function setMailLog(installerName, customerId,email){
console.log("Email Attempted:");
$.ajax({
url: 'functions.php',
type: 'POST',
dataType:'text',
data: 'elogins='+installerName+'&elogcid='+customerId,
success: function(result){
console.log(result);
$("#mimg_"+customerId).wrap('<a id="mhrefid_'+customerId+'" target="_blank"></a>');
$('#mhrefid_'+customerId).attr('href','mailto:'+email);
window.location.href=$("#mhrefid_"+customerId).attr('href');
}
});
}
これは、すべてのデスクトップブラウザで完全に正常に機能しています。Androidのデフォルトのブラウザでは正常に動作しますが、AndroidのChromeでは機能しません。これは、これらがモバイル機能であり、すべてのブラウザのモバイルデバイスで動作する必要があるため重要です。
AndroidのChromeでメールアイコンをクリックすると、
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
エラーページは特定のiframeにのみ表示され、index.phpファイル全体には表示されません。
呼び出しとSMSは同じように機能しますが、エラーがtel:5225
またはに変わるだけです。sms:5114
これはすべてiframe内にありますが、それが問題の原因である可能性がありますか?