<html>
|
<head>
|
</head>
|
<body>
|
<input type=text id=t></input>
|
<!--This also works with shockwave flash plugin.Change src=test.pdf to src=test.swf-->
|
<embed id=pdf-viewer src=test.pdf></embed>
|
<script>
|
i = 0;
|
document.addEventListener('readystatechange', function() {
|
|
if (i == 1)
|
{
|
document.body.appendChild(document.getElementById('pdf-viewer'));
|
document.getElementById('t').focus();
|
document.location.reload();
|
}
|
else
|
{
|
alert("Press escape key or click ok button!");
|
}
|
i++;
|
});
|
|
window.addEventListener('DOMContentLoaded', function() {
|
|
document.body.removeChild(document.getElementById('pdf-viewer'));
|
});
|
|
|
</script>
|
|
|
</body>
|
</html>
|