EA wrote:
The code below successfully open a blank new Window, the OpenWin
function is held in a separate file and I use it successfully to open
windows elsewhere on my site. However the window is completely blank
and "about:blank - Microsoft Internet explorer" appears in it's title
bar. The new window corresponds to the sizes I enter in the OpenWin
function, so this must be working.
What I want is for a PDF file, based on the user's selection to be
displayed in this new window. Can anyone see from the code below why
this is not happening?
<table>
<tr>
<form name=Downloads method=POST action=Choice.asp
target=TestWin> <td>
<Select size="3" Name=Download
onchange=OpenWin("TestWin",720,600)> <option
value="1">Download1 <option value="2">Download2
<option value="3">Download3
<option value="4">Download4
</Select>
</td>
</form>
</tr>
</table>
This is the body of Choice.asp, which is in the same directory as the
calling page above:
<body>
<%
Select Case Request("Download")
Case 1
Response.Redirect ("Download1.pdf")
Case 2
Response.Redirect ("Download2.pdf")
Case 3
Response.Redirect ("Download3.pdf")
Case 4
Response.Redirect ("Download4.pdf")
End select
%>
</body>
All the PDF are in the same directory.
When I manually enter a URL ....{path}/Choice.asp?Download=1, then
Download1.pdf appears in the window.
Can anyone assist... this has been driving me crazy!!!!!
What happens if you close the option tags?
Have you tried to response.write the contents of the form in Choice.asp?
--
Lee Carnell
"Oh my God... they float... they float through space... they will carry
me across the void... I feel them coming!" -- overheard in Ward 13 and
registered by the resident psychiatrist.