図を見てください。私はIEに問題があり、誰かが助けてくれることを望んでいました。訪問者が来て特定の会議にサインアップするサイトがあり、その後、彼らが選んだカレンダー。選択肢は、Gmail、yahoo、およびOutlookです。Gmailとyahooの予定はすべてのブラウザで期待どおりに生成されますが、Outlookの予定はIEを除くすべてのブラウザで機能します。IEは、ファイル保存ダイアログをスローする代わりに、新しいウィンドウを開いてURLをナビゲートしようとします。
私は少し変更したiCalendarjqueryライブラリを使用しており、このようにjavascriptでicsマークアップを構築しています
//build ics markup
var event = makeAppointment(settings);
//render ics markup as outlook appointment
window.open("data:text/calendar;charset=utf8," + escape(event));
function makeAppointment()
{
return 'BEGIN:VCALENDAR\n' +
'VERSION:2.0\n' +
'PRODID:jquery.icalendar\n' +
'METHOD:PUBLISH\n' +
'BEGIN:VEVENT\n' +
'UID:' + new Date().getTime() + '@' +
(window.location.href.replace(/^[^\/]*\/\/([^\/]*)\/.*$/, '$1') || 'localhost') + '\n' +
'DTSTAMP:' + $.icalendar.formatDateTime(new Date()) + '\n' +
(event.url ? limit75('URL:' + event.url) + '\n' : '') +
(event.contact ? limit75('MAILTO:' + event.contact) + '\n' : '') +
limit75('TITLE:' + event.title) + '\n' +
'DTSTART:' + $.icalendar.formatDateTime(event.start) + '\n' +
'DTEND:' + $.icalendar.formatDateTime(event.end) + '\n' +
(event.summary ? limit75('SUMMARY:' + event.summary) + '\n' : '') +
(event.description ? limit75('DESCRIPTION:' + event.description) + '\n' : '') +
(event.location ? limit75('LOCATION:' + event.location) + '\n' : '') +
(event.recurrence ? makeRecurrence(event.recurrence) + '\n' : '') +
'END:VEVENT\n' +
'END:VCALENDAR';
}