I have an input button in the form
<input TYPE="Button" name="download" ONCLICK="location='downloadref.cfm?UpdateItem=#getreflist.controlNumber#'" VALUE="Download Reference">
When the button is clicked, go to the other page, using cfobject, ActivePDF to show a downloadable PDF form. The form shows fine. I would like to have the PDF form be opened in a new window. So I used the following ..
<SCRIPT LANGUAGE="JavaScript">
function popWindow(file,window,params)
{destWindow=open(file,window,params);
if (destWindow.opener == null) destWindow.opener = self;
destWindow.focus();
}
</SCRIPT>
<input TYPE="Button" name="download" ONCLICK="javascript
opWindow('downloadref.cfm?UpdateItem=#getreflist.controlNumber#','destWindow');" VALUE="Download Reference">
Then I got file download window and asked to choose "save" or "open". either one, I would get an error.
The above onclick coding works fine in <a href="">. So my question is how to open a new window using input button.
Thanks
<input TYPE="Button" name="download" ONCLICK="location='downloadref.cfm?UpdateItem=#getreflist.controlNumber#'" VALUE="Download Reference">
When the button is clicked, go to the other page, using cfobject, ActivePDF to show a downloadable PDF form. The form shows fine. I would like to have the PDF form be opened in a new window. So I used the following ..
<SCRIPT LANGUAGE="JavaScript">
function popWindow(file,window,params)
{destWindow=open(file,window,params);
if (destWindow.opener == null) destWindow.opener = self;
destWindow.focus();
}
</SCRIPT>
<input TYPE="Button" name="download" ONCLICK="javascript

Then I got file download window and asked to choose "save" or "open". either one, I would get an error.
The above onclick coding works fine in <a href="">. So my question is how to open a new window using input button.
Thanks