Code:
<script type="text/javascript">
function getTerm(){
var srchStr=document.getElementById('searchBox').value
return srchStr
}
</script>
<input type="text" id="searchBox">
<input type="button" value="Search" onmousedown="testiframe.location.replace('blank.htm');" onmouseup="testiframe.location.replace('E:\Documents\general docs\SDKJSSnippet1.pdf#search=#search=\''+getTerm()+'\'')">
<iframe name="testiframe" src="E:\Documents\general docs\SDKJSSnippet1.pdf#search="></iframe>
You may have to replace the space in the pathname with %20 to get this to work. Also, adjust the iframe's properties (size, scrolling, etc.) to suit. Requires 'blank.htm':
Code:
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
This last bit might not be needed. I didn't want to test on an actual .pdf file. You could try it without this by removing the onmousedown event and see what happens. Is this for local or internet use?
Bookmarks