Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am making a document viewer. in that i want to open any document in iframe,so user can just see it.

so which code is used in iframe for display a document.

Please help me..
Regards....
Mitesh
Posted

 
Share this answer
 
HTML
<iframe name="2" width="99%" height="800px" src=""></iframe>


in
HTML
src="source page"
write your source page which you want to display.
 
Share this answer
 
Comments
[no name] 9-May-12 5:13am    
but when i open doc file in google chrome browser it prompt me to save a file that i do not want.
AshishChaudha 9-May-12 5:20am    
it cant be handle for some browser like chrome.either you can convert your doc file to pdf...
[no name] 9-May-12 6:02am    
and in case of ppt and excel file
AshishChaudha 9-May-12 6:06am    
same problem with any of msoffice creatives.
[no name] 9-May-12 6:16am    
so it is possibel when i add some extension in google chrome browser.
or what you say it is impossible to view document without save in google chrome....

if possible please help me brother....
XML
<html>
<body>

<iframe src="your document">
  
</iframe>

</body>
</html>
 
Share this answer
 
Hi,
In body Tag put:


HTML
<iframe src="Document">
  
</iframe>


Replace, "Document" with your DoucmentName (e.g. Index.html)

For more detail and attributes, you can see following link:




http://www.w3schools.com/tags/tag_iframe.asp[^]

Happy Coding :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900