Could you please help me with an html.Iframe usage in dash layout. I haven´t found any answer via community yet.
I create
app.layout = html.Iframe(src = “Trial.html”)
I see the borders of the frame but the site is not loaded and the frame is empty. I tried both absolute and relative paths. If path does not exists it loads the copy of the main site recurcively.
From the pure html file the … works well. Ha ha, even here in forum it regonizes html code.
What might be the reason that iframe does not work in dash?
The reason why I do it acutally, is the ability to read html code into the main dash site. I faced the problem with big tables: it is much faster to create html-code rather than pack each cell with html.Table, html.Tr, html.Td methods.
May be you have another ideas how to load big tables in to main site with dash? Big table is kind of 20000 x 300 from pandas dataframe. Pandas create html-code in a second and packing with html. methods takes minutes.
I believe that setting src="Trial.html" will try to serve a file named Trial.html. By default, Dash does not serve files. You will need to add a new route to the server to serve that file, like this: