2012-09-30 28 views
3

我正在開發一個小型WebApp for iPad,以便向SSRS用戶呈現報告。我知道現在有像MobiWave這樣的解決方案,但我的客戶要求我開發一種更適合他的環境的解決方案。iPad上的Webapp在一個新的Safari瀏覽器標籤中打開iFrame的鏈接

所以我的問題是以下。我將SSRS的內容加載到iFrame中並呈現給用戶。現在,當我點擊鏈接時,行爲如下。在Chrome中,Safari移動版(在iPad上)網站按預期工作。當我運行與web應用程序相同的站點時,鏈接將在新的Safari瀏覽器窗口中打開。我嘗試了許多解決方案,如thisthis,但我沒有按預期工作。

我的代碼如下:

<!DOCTYPE html> 
<html> 
<head> 
    <title> TEST </title> 
    <link rel="stylesheet" href="css/jquery.mobile-1.1.1.min.css" /> 
    <link rel="stylesheet" href="css/style.css" /> 
    <script src="js/jquery-1.7.1.min.js"></script> 
    <script src="js/jquery.mobile-1.1.1.min.js"></script> 
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes"> 
    <link rel="apple-touch-icon" sizes="72x72" href="images/touch-icon-ipad.png" /> 
    <link rel="apple-touch-startup-image" href="images/startup.png"> 
    <meta name="apple-mobile-web-app-capable" content="yes" /> 
    <meta name="apple-mobile-web-app-status-bar-style" content="black" /> 
</head> 
<body> 
    <div data-role="page" id="home"> 
<div data-role="header"> 
     <ul data-role="controlgroup" data-type="horizontal" class="localnav"> 
    <li><a data-role="button" data-rel="back" data-icon="arrow-l">Back</a></li> 
    <li><a href="./" data-role="button" data-icon="home" data-ajax="false">Home</a></li> 
    </ul> 
</div> 
<div id="content" data-role="content"> 
     <iframe src="../ReportServer"></iframe> 
</div> 
    </div> 
</body> 
</html> 

編輯

其加載到iFrame中的代碼如下:

<html> 
    <head> 
    <meta name="Generator" content="Microsoft SQL Server Reporting Services, Version 10.50.1600.1"> 
    <title>localhost/ReportServer - /Reportings</title> 
    </head> 
<body><H1>localhost/ReportServer - /Reportings</H1><hr> 
    <pre> 
    <A HREF="http://localhost/ReportServer?&amp;rs%3ACommand=ListChildren">[In &#252;bergeordnetes Verzeichnis]</A> 
    Donnerstag, 13. September 2012 15:16  39033 <A HREF="?%2fReportings%2fReport1&amp;rs:Command=Render">Report1</A> 
</pre> 
<hr> 
Microsoft SQL Server Reporting Services, Version 10.50.1600.1 
</body> 
</html> 

回答

1

哪些鏈接打開新的標籤頁,jqm導航或報告服務報告內容?您的報告是作爲完整的報告服務網站Ui加載還是直接鏈接到報告服務器報告的基本呈現?

如果鏈接到報表的報表服務器版本,則一個回退可能會呈現爲PDF而不是HTML。

考慮刪除對jQuery Mobile的依賴,因爲它可能會干擾正常的頁面/點擊事件。你可能也想看看其他替代移動框架,如果你打算建立一個更大的移動應用程序,並與JQM兼容性問題:

+0

感謝快速回答。 jqm的鏈接按預期工作。問題是iframe中的鏈接。我附加了一個帶有兩個鏈接的生成站點,它們加載到一個新的選項卡中,而不是加載到iFrame中。 – user1692091

+0

可能是使用jquery移動干擾頁面事件:http://www.12live.de/de/blog/javascript/ipad-stay-in-webapp-fullscreen-when-links-in-embedded-iframe-are點擊/你可以嘗試沒有jqm的iframe。 –

+0

謝謝,該作品:) – user1692091

相關問題