One method is to create a previousPage instance variable on the new page, then in the action method that creates the new page do something like
- gotoNextPage {
WOComponent *woPage;
woPage =3D [[self application] pageWithName:nextPageName];
[woPage setPreviousPage:self];
return woPage;
}
Then create a back button or link that returns previousPage.
I use the referer when moving to a WOApp from static HTML then back to the static HTML page. You can go between apps as well.
On the target app, get the referer (doesn't always exist) from the request, do your processing, return result page, then go back to referer.=20=
I usually use a meta refresh scheme to the users sees the final app page, then is automatically returned to the referer.
*.m
***************************
- init {
[super init];
request =3D [[[self session] context] request];
return self;
}
- (NSString *)referer {
return [request headerForKey:@"referer"];
}
- (NSString *)refreshMetaTagString {
NSString *tempString;
tempString =3D [NSString stringWithFormat:@"<META http-equiv=3D\"Refresh\"; content =3D \"5; URL=3D%@\">",[self referer]];
return tempString;
}
*************************************
*.wod
**************************************
refreshMetaTag:WOString {
value =3D refreshMetaTagString;
escapeHTML =3D NO;
}
*************************************
*.html
***********************************
Title string here./TITLE>
<WEBOBJECT name=3DrefreshMetaTag></WEBOBJECT>
=20
...
=20
****************************************
Home this helps, Derin.
You wrote:
> At 8:13 AM -0800 3/18/99, Pierce T. Wetter III wrote:
> How does one make a "Return To Previous Page" link? I would think it =
would
> just be a matter of getting the "referer" URI/URL.
>=20
> Javascript is an easier way to do this then WO. The browser already
> knows what the previous URL was so its just one line of Javascript to
> do this. Its something like "history.back()".
>=20
> We've got a "no javascript" directive... along with a few others. We =
need
> to be compatible with set top boxes and not all handle javascript.
>=20
> On the other hand, it depends on exactly why you want to do this.
> For UI reasons, you might want to have a "back to Movies" from the
> talent editor, or some other kind of "conceptual previous page".
>=20
> If someone goes to the About, Help, or Contact page from anywhere in the
> site (they are universal jump points on our site) I'd like the user to go
> back to their previous page instead of some fixed point.
>=20
> I prefer the javascript method, but can't rely on it.
>=20
> mark
> =
---------------------------------------------------------------------------
> Mark F. Murphy, Director Software Development <` =
`mailto:[EMAIL PROTECTED]>
> Tyrell Software Corp <` =
`http://www.tyrell.com>
> PowerPerl(tm), Add Power To Your Webpage! <` =
`http://www.powerperl.com>
> =
---------------------------------------------------------------------------
> Member of Families Against Internet Censorship: =
rainbow.rmi.net/~fagin/faic
>=20
>=20
>=20
=
