2012-07-13 125 views
1

我已經搜索並搜索了一個答案,但我似乎無法找出我做錯了什麼。我正在構建一個將綁定到Google API中的Windows 8應用程序,並掛上了整個iframe概念。我已經遵循例子後的例子,似乎沒有任何工作。以下是我嘗試使用的兩個頁面的一部分,以及我得到的錯誤。任何幫助將不勝感激。提前致謝!Windows 8 Metro應用程序Iframe

<html> 
<head> 
<meta charset="utf-8" /> 
<title>WinWebApp1</title> 
<!-- WinJS references --> 
<script src="//Microsoft.WinJS.1.0.RC/js/base.js"></script> 
<script src="//Microsoft.WinJS.1.0.RC/js/ui.js"></script> 
<!-- WinWebApp1 references --> 
</head> 
<body> 
<div> 
<iframe id="Iframe" src="ms-app-web:///page.html"></iframe> 
</div> 
</body> 
</html> 

第2頁

<!DOCTYPE html> 
<html> 
<head> 
    <title>Test</title> 
</head> 
<body> 
<div>This is a test</div> 
</body> 
</html> 

我得到的錯誤

APPHOST9624: The app can’t use script to load the ms-app-web:///page.html url because the url launches another app. Only direct user interaction can launch another app. 
+4

你可能打算使用ms-appx-web – Denis 2012-07-14 03:50:10

+0

你完全正確。這似乎已經解決了這個問題..奇怪,因爲我認爲我已經嘗試過。無論哪種方式謝謝你! – BlakeJ 2012-07-14 04:42:27

回答

1

我遇到了同樣的問題。這絕對是你想要的「ms-appx-web」。

<iframe id="Iframe" src="ms-appx-web:///page.html"></iframe> 
相關問題