Getting fragment from URL
Getting fragment from URL
am 29.09.2007 03:50:53 von Michael
I have a series of pages I want to put a link on that will allow them
to go back to the page they entered from (the referring URL). The
problem is that to return to the previous page correctly I need the
fragment (page.asp#fragment) along with the referring url. Problem is
that ASP does not seem to provide that. Any advice on how to get the
fragment along with the URL?
For those who might suggest doing a javascript back()... this will not
work since the area people are going into can be a group of pages and
they may click around a few times before wanting to return, so I was
going to save the referring URL when the enter.
Thanks
Re: Getting fragment from URL
am 29.09.2007 04:40:09 von McKirahan
wrote in message
news:1191030653.968613.269330@k79g2000hse.googlegroups.com.. .
> I have a series of pages I want to put a link on that will allow them
> to go back to the page they entered from (the referring URL). The
> problem is that to return to the previous page correctly I need the
> fragment (page.asp#fragment) along with the referring url. Problem is
> that ASP does not seem to provide that. Any advice on how to get the
> fragment along with the URL?
>
> For those who might suggest doing a javascript back()... this will not
> work since the area people are going into can be a group of pages and
> they may click around a few times before wanting to return, so I was
> going to save the referring URL when the enter.
Are the pages they come from under your control and are they ASP
pages? If so then you could use Session variables when the page
is entered and refer to that when wanting to return to it. Perhaps:
<%
Session("Last_Page") = Session("This_Page")
Session("This_Page") = Request.ServerVariable("URL")
&>
Re: Getting fragment from URL
am 29.09.2007 04:51:59 von McKirahan
"McKirahan" wrote in message
news:jNidndSUh4iEJ2DbnZ2dneKdnZydnZ2d@comcast.com...
> wrote in message
> news:1191030653.968613.269330@k79g2000hse.googlegroups.com.. .
> > I have a series of pages I want to put a link on that will allow them
> > to go back to the page they entered from (the referring URL). The
> > problem is that to return to the previous page correctly I need the
> > fragment (page.asp#fragment) along with the referring url. Problem is
> > that ASP does not seem to provide that. Any advice on how to get the
> > fragment along with the URL?
> >
> > For those who might suggest doing a javascript back()... this will not
> > work since the area people are going into can be a group of pages and
> > they may click around a few times before wanting to return, so I was
> > going to save the referring URL when the enter.
>
> Are the pages they come from under your control and are they ASP
> pages? If so then you could use Session variables when the page
> is entered and refer to that when wanting to return to it. Perhaps:
>
Perhaps something more like this?
<%@ Language="VBScript" %>
<% Option Explicit
'*
Session("Last_Page") = Session("This_Page")
Session("This_Page") = Request.ServerVariables("URL") _
& "?" & Request.QueryString()
%>
<%=Session("This_Page")%>
This Page = <%=Session("This_Page")%>
Last Page = <%=Session("Last_Page")%>
Re: Getting fragment from URL
am 29.09.2007 16:44:21 von Adrienne Boswell
Gazing into my crystal ball I observed michael@diverge.com writing in
news:1191030653.968613.269330@k79g2000hse.googlegroups.com:
> I have a series of pages I want to put a link on that will allow them
> to go back to the page they entered from (the referring URL). The
> problem is that to return to the previous page correctly I need the
> fragment (page.asp#fragment) along with the referring url. Problem is
> that ASP does not seem to provide that. Any advice on how to get the
> fragment along with the URL?
>
> For those who might suggest doing a javascript back()... this will not
> work since the area people are going into can be a group of pages and
> they may click around a few times before wanting to return, so I was
> going to save the referring URL when the enter.
>
> Thanks
>
The fragment is client side and ASP has no way of accessing it. If the
page in question has a lot of information you could do something like:
Title
....
Title
...
Title
...
Most users know how to use the back button (unless you broke it opening
a new window), and also know how to use the page down key, scroll or
otherwise get around the page.
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share