CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Is there a way To Determine What Page Called A Page?

Print topic Send  topic

Author Message
Chris Moore
Posted: 08/22/2003, 12:53 PM

I need to create 'Back to Previous Page' link at the bottom of my user
update form. I can't just use the BACK button because if they have made
several updates, that update page will have been refreshed multiple times &
the back back will just go through those pages also - which I don't want. I
just need a way to go back to the page where this update page was called
from. The update page can be called from ,ultiple pages so I can't really
hardcde it & I would prefer not to pass it in the URL.

Any ideas?

Thanks

Chris
DonB
Posted: 08/26/2003, 6:15 PM

In the original page's BeforeUnload event set a session variable to an
appropriate combination of the variables "PathToRoot", "ScriptPath",
"Filename". From these values you will be able to construct a suitable URL
that returns you to this page. Now, on the other page(s), you can set the
"Redirect" variable in the Back button (or elsewhere as suits your purpose)
to this session variable's value. This will cause the second page to
redirect back to the original page, not the "previous page". BTW, I prefer
to use a Link control instead of a Button because I have less trouble
getting the Link to work. Buttons somethimes give me fits for things like
this, and it's easy to alter the CSS of the Link to make it look like a
Button. With the Link, you can set the .Link property to what ever is in
the session variable - in the Link's BeforeShow event.

--
DonB

http://www.gotodon.com/ccbth


"Chris Moore" <chris@dblayout.com> wrote in message
news:Xns93DF97CB4F41cabubba@66.180.229.147...
> I need to create 'Back to Previous Page' link at the bottom of my user
> update form. I can't just use the BACK button because if they have made
> several updates, that update page will have been refreshed multiple times
&
> the back back will just go through those pages also - which I don't want.
I
> just need a way to go back to the page where this update page was called
> from. The update page can be called from ,ultiple pages so I can't really
> hardcde it & I would prefer not to pass it in the URL.
>
> Any ideas?
>
> Thanks
>
> Chris

Chris Moore
Posted: 08/27/2003, 8:23 AM

Thanks. I ended up just passing a URL variable and using that to trigger
what page to return to. This page is only called by 2 other pages. I
though of using session variables but I'm just not sure about them yet. I
do use them. I'm just not sure how long they hand around, how much memory
they use and how to get rid of them. Are there any memory usgae issues
that come from using session variables?

I did run into 1 issue. I had a problem when I was on the record update
form and then called (or linked to) my user profile update page. When I
went back to the record update page, all my fields were empty. It's like
the page got confused about what it was suppsoed to be doing. It didn't
remember that it was in update mode and not new add mode. Have you
encountered this before?

Thanks

Chris

"DonB" <~ccbth~@gotodon.com> wrote in
news:bih0nr$r29$1@news.codecharge.com:

> In the original page's BeforeUnload event set a session variable to an
> appropriate combination of the variables "PathToRoot", "ScriptPath",
> "Filename". From these values you will be able to construct a
> suitable URL that returns you to this page. Now, on the other
> page(s), you can set the "Redirect" variable in the Back button (or
> elsewhere as suits your purpose) to this session variable's value.
> This will cause the second page to redirect back to the original page,
> not the "previous page". BTW, I prefer to use a Link control instead
> of a Button because I have less trouble getting the Link to work.
> Buttons somethimes give me fits for things like this, and it's easy to
> alter the CSS of the Link to make it look like a Button. With the
> Link, you can set the .Link property to what ever is in the session
> variable - in the Link's BeforeShow event.
>
DonB
Posted: 08/27/2003, 1:59 PM

Session variables are no big deal, but everyone recommends you don't use
them to store objects.

On the update form, it sounds like you lost the URL parameter(s) for the key
to the datasource, so the form went into the insert mode instead of update.

--
DonB

http://www.gotodon.com/ccbth


"Chris Moore" <chris@dblayout.com> wrote in message
news:Xns93E46A0E91F67cabubba@66.180.229.147...
> Thanks. I ended up just passing a URL variable and using that to trigger
> what page to return to. This page is only called by 2 other pages. I
> though of using session variables but I'm just not sure about them yet. I
> do use them. I'm just not sure how long they hand around, how much memory
> they use and how to get rid of them. Are there any memory usgae issues
> that come from using session variables?
>
> I did run into 1 issue. I had a problem when I was on the record update
> form and then called (or linked to) my user profile update page. When I
> went back to the record update page, all my fields were empty. It's like
> the page got confused about what it was suppsoed to be doing. It didn't
> remember that it was in update mode and not new add mode. Have you
> encountered this before?
>
> Thanks
>
> Chris
>
> "DonB" <~ccbth~@gotodon.com> wrote in
>news:bih0nr$r29$1@news.codecharge.com:
>
> > In the original page's BeforeUnload event set a session variable to an
> > appropriate combination of the variables "PathToRoot", "ScriptPath",
> > "Filename". From these values you will be able to construct a
> > suitable URL that returns you to this page. Now, on the other
> > page(s), you can set the "Redirect" variable in the Back button (or
> > elsewhere as suits your purpose) to this session variable's value.
> > This will cause the second page to redirect back to the original page,
> > not the "previous page". BTW, I prefer to use a Link control instead
> > of a Button because I have less trouble getting the Link to work.
> > Buttons somethimes give me fits for things like this, and it's easy to
> > alter the CSS of the Link to make it look like a Button. With the
> > Link, you can set the .Link property to what ever is in the session
> > variable - in the Link's BeforeShow event.
> >
>

Chris Moore
Posted: 08/27/2003, 9:19 PM

I will check that out.

Thanks


"DonB" <~ccbth~@gotodon.com> wrote in
news:bij633$jkd$1@news.codecharge.com:

> Session variables are no big deal, but everyone recommends you
don't
> use them to store objects.
>
> On the update form, it sounds like you lost the URL parameter
(s) for
> the key to the datasource, so the form went into the insert
mode
> instead of update.
>

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.