Coding inside iframe

I have found how send variable to adobeDCView . previewFile:
<!doctype html>

HTML Component Test

Message will go here

But I cannot assign to variable Docname the correct content of Id ‘demo’ (passed by a click on an image) e display correctly in the paragraph.
Can anyone hlep me ?