|
-
November 12th, 2002, 03:42 AM
#1
response.redirect question ?
How do I change this to a response.redirect please?
<A HREF="default.asp?fname=<%=filename%>">Continue</A>
Thanks in advance.
-
November 12th, 2002, 04:26 AM
#2
Re: response.redirect question ?
Originally posted by Klas
How do I change this to a response.redirect please?
<A HREF="default.asp?fname=<%=filename%>">Continue</A>
Thanks in advance.
This is HTML :
<A HREF="default.asp?fname=<%=filename%>">Continue</A>
This is server-side scripting :
<%
Response.Redirect("http://www.google.com")
%>
Notice the diffence?
In addition, please explain what you're trying to do and post either URL or source, if possible.
Zvona - First aid for client-side web design
-
November 12th, 2002, 04:47 AM
#3
Hi! 
Sure I will. 
I have
<A HREF="default.asp?fname=<%=filename%>">Continue</A>
at the end of a page where I have used JMAIL for uplaoding a file chosed by the user. The variable of the file is "filename".
And instead of clicking on Continue, I would like that the page default opends automaticly, and brings the filename in the url(as a querystring)
It works fine with the HTML link now, but it is a unnessecery(spelling?) step.
(ASP)
Best regards, Klas
-
November 12th, 2002, 01:04 PM
#4
For server side scripting (ASP), do this at the end of your script:
Code:
<%
Response.Redirect("default.asp?fname=" & filename)
%>
Although, be aware that the user will never see the page before the redirect occurs. So if you had some message for them there, they won't see it.
If you do want them to see such a message, you're better off doing a meta:
Code:
<META HTTP-EQUIV="Refresh" Content="10; URL =default.asp?fname=<%= filename %>">
or client-side (javascript) script:
Code:
document.location = "default.asp?fname=<%= filename %>"
redirect.
- Shawn
MCP, VB6: Desktop Apps
[ C# | VB | .NET | Java | VC++ | Perl | PHP | Javascript ]
Unless otherwise stated, all sample code provided is UNTESTED.
http://www.codemastershawn.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|