very basic redirect question

M

middletree

In using a page with IFrame, I woudl like to write a line like this:

If (certain criteria met) then
response.redirect(somepage.asp)
end if

Pretty simple, except that I would like to make it to the full page. In
other words, if it were a regular HTML hyperlink, the code would be
<a href=somepage.asp? target="_parent">

Is there a way to specify targets in ASP redirects?
 
M

middletree

I should add that I did research this in several ways, and couldn't find an
answer.

More precisely, I went to aspfaq.com and found
http://aspfaq.com/show.asp?id=2052

because of that page, I wrote this code:

'response.Redirect("InLineFullTicketInfo.asp?TicketID="&strTicketID)

url = "DisplayFullTicketInfo.asp?TicketID="&strTicketID response.write("")

The part that is commented out is the old way, which, when called from a
page inside the IFrame, called my other page inside the same IFrame.
However, for reasons way too long to go into, I would like it so instead go
to the page you see in the uncommented line, but to target it to the parent.
When I tried the above code, it simply didn't redirect. No error msg was
given.
 
M

middletree

For some reason, pasting my code didn't work out right in that last post.
Here's what I meant.

url = "DisplayFullTicketInfo.asp?TicketID="&strTicketID response.write(" ")
response.write("<script>" & vbCrLf)
response.write("parent.framename.location.replace('" & url & "');")
response.write(vbCrLf & "</script>")
 
E

Evertjan.

middletree wrote on 28 okt 2005 in microsoft.public.inetserver.asp.general:
In using a page with IFrame, I woudl like to write a line like this:

If (certain criteria met) then
response.redirect(somepage.asp)
end if

Pretty simple, except that I would like to make it to the full page. In
other words, if it were a regular HTML hyperlink, the code would be
<a href=somepage.asp? target="_parent">

Is there a way to specify targets in ASP redirects?

ASP does not know and is not interesed in frames.
It will just sent it's rendered html-stream to wherever it is directed.
ASP redirection does not refresh a page, but asks the browser to ask for
another page.

Your question should be answered by clientside code,
such as a frame-jump-out javascript.

OT clientside script, but anyway:

<script type="text/javascript">
if (window!= window.top) top.location.href = location.href;
</script>
 
B

Bob Barrows [MVP]

I'm wondering if you are aware that you are responding to some pretty dead
threads. You may find that the OP's aren't watching them anymore, and that
you might find it more fruitful to concentrate on more recent threads.

But far be it from me to try to tell you how to spend your time ... :)
 
S

Stefan Berglund

On Sun, 4 Dec 2005 14:02:01 -0500, "Bob Barrows [MVP]"
in said:
I'm wondering if you are aware that you are responding to some pretty dead
threads. You may find that the OP's aren't watching them anymore, and that
you might find it more fruitful to concentrate on more recent threads.

But far be it from me to try to tell you how to spend your time ... :)

Google ~powerasp~ in this group and perhaps the pattern will be revealed. I
believe this was the URL in the series of SPAMS to this group last month but I
can't find a single one of them in my reader or on the server...
 
B

Bob Barrows [MVP]

Stefan said:
On Sun, 4 Dec 2005 14:02:01 -0500, "Bob Barrows [MVP]"


Google ~powerasp~ in this group and perhaps the pattern will be
revealed. I believe this was the URL in the series of SPAMS to this
group last month but I can't find a single one of them in my reader
or on the server...
That was my first thought as well, but I thought I had seen Kyle around
before. Unless someone is masquerading as him ...
 
L

Larry Randolf

Course it probably doesn't help the confusion any when I keep forgetting I
am on larrys computer.
My laptop has been acting up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top