PDA

View Full Version : Is it possible to open a .ppt on a window?



Elfayer
27 Aug 2012, 6:23 AM
Hi,

Everything is in the post title. Is it possible to open a .ppt on a window?

harman
27 Aug 2012, 6:48 AM
If exactly you want to show it inside a Frame it is an uphill thing to do as i think.
All i can suggest is you can do this


window.open('URL_to_your_PPT');


This will open a new window and provide option to download or view the resource file.
I haven't tested it with .ppt but it works with .xls

Elfayer
27 Aug 2012, 7:18 AM
I have a white page. That probably comes from the fact that I'm trying to display a ppt with a javascript text :
"<script src="@Url.Content("~/Scripts/src/test.pptx")" type="text/javascript"></script>"

I should change the type.

Elfayer
27 Aug 2012, 11:18 PM
I have that on my controller sencha:


var ppt = Ext.create('Ext.window.Window', {
width: 1000,
height: 700,
html: '<iframe src="http://localhost:64517/Home/PowerPoint", height="100%", width="100%">'
}).show();

HomeController.cs:

[Authorize]
public ActionResult PowerPoint()
{
return View();
}

PowerPoint.cshtml (~/Views/Home/PowerPoint.cshtml):

@{
Layout = "~/Views/Shared/admin.cshtml";
}

<script src="@Url.Content("~/Scripts/src/test.pptx")" type="text/javascript"></script>



~/Views/Shared/admin.cshtml :

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />

<script src="@Url.Content("~/Ext/bootstrap.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Ext/resources/css/ext-all.css")" rel="stylesheet" type="text/css" />


<script src="@Url.Content("~/Scripts/jquery/jquery-1.7.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/modernizr/modernizr-2.6.1.min.js")" type="text/javascript"></script>

</head>
<body>
<div id="main">
@RenderBody()
</div>
</body>
</html>



Is there an xtype for pdf, ppt, ... ?