internet explorer - How can I let a user cancel Chrome Frame installation when prompted -
i'm using default cfinstall script google (with few minor changes):
<style> .chromeframeinstalldefaultstyle { width: 80%; /* default 800px */ border: 5px solid blue; position: absolute; left: 40%; z-index: 1000; } </style> <div id="prompt"> <!-- if ie without gcf, prompt goes here --> </div> <script> // conditional ensures code execute in ie, // therefore can use ie-specific attachevent without worry window.attachevent("onload", function() { cfinstall.check({ mode: "inline", // default node: "prompt" }); }); </script> this prompts ie8 or less user install chrome frame. user cannot cancel or close iframe. how can achieve this.
ok, got it: need set mode "overlay": has 1 drawback: dialog won't reappear after refreshing page.
<style> .chromeframeinstalldefaultstyle { width: 80%; /* default 800px */ border: 5px solid blue; position: absolute; left: 40%; z-index: 1000; } </style> <div id="prompt"> <!-- if ie without gcf, prompt goes here --> </div> <script> // conditional ensures code execute in ie, // therefore can use ie-specific attachevent without worry window.attachevent("onload", function() { cfinstall.check({ mode: "overlay", // "inline" = default node: "prompt" }); }); </script>
Comments
Post a Comment