472,145 Members | 1,391 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Opening and Filling New Windows

EA

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!!!!!
Jun 12 '06 #1
4 1368

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!!!!!


This is a client-side question, which would best be addressed in a
group dealing with client-side scripting. Try
microsoft.public.scripting.jscript.

--
Mike Brind

Jun 13 '06 #2
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.
Jun 13 '06 #3
Why is the FORM tag inside of the TR tag instead of the TD tag?
Does the OpenWin function submit the form? Nothing in the code below does
that.

"EA" <NO****@twelve.me.uk> wrote in message
news:44*********************@ptn-nntp-reader01.plus.net...

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!!!!!

Jun 13 '06 #4

Mike Brind wrote:
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!!!!!


This is a client-side question, which would best be addressed in a
group dealing with client-side scripting. Try
microsoft.public.scripting.jscript.


Oh hold on... try this:

Select Case cint(Request("Download"))

--
Mike Brind

Jun 13 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by zelnaga | last post: by
14 posts views Thread by D. Alvarado | last post: by
2 posts views Thread by ramesh | last post: by
reply views Thread by Nigel | last post: by
3 posts views Thread by Bradley Plett | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.