Display HTML from Static Resource in VF Page

441 views Asked by At

I have a HTML file in Static Resource, which I need to display in one of the sections as an overlay in Visualforce page.

How can this be achieved? I tried including directly, did not seem to work

1

There are 1 answers

0
ipradhansk On

Got the fix, using jQuery.

//Get the URL of the HTML Page
var pageURL = "{!$Resource.ResourceName}/html/PageName.html";

//Load the HTML Content to the element(based on ID or Class)
$('.target-element').load(pageURL);