Hi Kataleena,
Seems this a rendering bug in IE. I working on a patch for
pgGotoURL() which applies a workaround to this problem.
If your situation is urgent you can apply a type of fix as follows:
- Create a field on the page and name it "exec"
- Enter the following JavaScript into the field:
var rtn = tbfunction_pgGotoURL( "My PDF", "../dialog/iframe.html");
setTimeout( function() { rtn.src = "../media/myfile.pdf"; }, 500); - In the above code, replace "My PDF" with the name of the field into which you are trying to load the PDF. Also replace the path and file name "../media/myfile.pdf" with the one you are trying to load.
- Create a single action that executes this code to load the PDF that uses the function exeJavascriptDirect() and executes the code in our "exec" field.
- Execute field code
- Image 1.png (102.96 KiB) Viewed 1191 times
What does this do?IE has a rendering bug which will not render PDF files immediately in an iframe. So what this code does is load a blank page in the field first and then after 500ms, it will change the iframe source to the pdf file you want to load.
Is this cross-browser?YES.