Click here to Skip to main content
15,918,211 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to display a PDF with a static path . PDF is not displaying properly. It's seen as Loading with the below code .

Code as below:
divPDF.InnerHtml = "<object data='Images/blank_Utilities_AMND.pdf' type='application/pdf' width='600' height='700'></object>";
Posted
Updated 15-Sep-15 20:41pm
v2

1 solution

Try below code:

JavaScript
divPDF.innerHTML = "<object data='Images/blank_Utilities_AMND.pdf' type='application/pdf' width='600' height='700'></object>";


The innerHTML property sets or returns the HTML content (inner HTML) of an element.

Note: Make sure that divPDF is not null.
 
Share this answer
 
v3
Comments
Kandiya 17-Sep-15 7:42am    
what is to be set in divPDF in the source code part(aspx page)?
[no name] 17-Sep-15 8:01am    
You need to write above code inside javascript block. Because you have given code(in your question) and I just modified and put it.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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