creat a link that takes one BACK to the previous page.

Put your questions here on how to do things in ProtoShare.
manimejia
Posts: 16
Joined: Fri May 07, 2010 6:24 am

creat a link that takes one BACK to the previous page.

Postby manimejia » Fri May 07, 2010 2:00 pm

Hello,

basically, I want a back button in a page that is linked to by many others. It needs to know the origin page and link back to it.

I found this post very useful (viewtopic.php?f=13&t=531&p=1073&hilit=href#p1073) in learning how to link to other pages from the rich HTML component. Maybe the solution is to dynamicaly retrieve these I'd numbers that reference page values, using javascript in the same rich HTML component.

any solutions?

Josh Kristof
Posts: 525
Joined: Tue Mar 31, 2009 3:40 pm

Re: creat a link that takes one BACK to the previous page.

Postby Josh Kristof » Mon May 10, 2010 8:29 am

Here's an example of how you can make a back link using an Advanced HTML component. The link will take you to the last page you were on. If you need any further assistance, please let us know.

Code: Select all

<!DOCTYPE html>
<html>
<head><script>document.domain = "protoshare.com";</script><title></title></head>
<body>
<a href="#" onclick="javascript: top.history.back();">Back</a>
</body>
</html>​
Josh Kristof
customerservice@protoshare.com
Site9, Inc. / Customer Support
blog.protoshare.com | twitter.com/protoshare

manimejia
Posts: 16
Joined: Fri May 07, 2010 6:24 am

Re: creat a link that takes one BACK to the previous page.

Postby manimejia » Mon May 10, 2010 10:56 am

Thanks Josh,

Seems so simple. Your assistance is much appreciated.

M.M.

manimejia
Posts: 16
Joined: Fri May 07, 2010 6:24 am

Re: creat a link that takes one BACK to the previous page.

Postby manimejia » Thu Mar 31, 2011 1:57 pm

Hello Josh,

Thanks for the tip, almost a year ago. Now that we're using Protoshare 5, this "browser history" solution does not seem to actually change the page display. Even though the URL changes, when I use this method, the page content does not.

My use case is (mostly) in mocking up "popup windows" as their own protoshare page, so that they can have different designs and simpler state architecture to load. When one of these "popup window" pages loads, the popup window's "close" button needs to take the viewer back to the previous protoshare page.

How can I get this to work again?

Josh Kristof
Posts: 525
Joined: Tue Mar 31, 2009 3:40 pm

Re: creat a link that takes one BACK to the previous page.

Postby Josh Kristof » Fri Apr 01, 2011 9:44 am

I've been trying to find a solution for you and have not been able to get one to fully work. Due to changes in ProtoShare it's possible that this can no longer be done; however, I'll still be looking into it.
Josh Kristof
customerservice@protoshare.com
Site9, Inc. / Customer Support
blog.protoshare.com | twitter.com/protoshare

manimejia
Posts: 16
Joined: Fri May 07, 2010 6:24 am

Re: creat a link that takes one BACK to the previous page.

Postby manimejia » Wed Apr 06, 2011 10:34 am

Are you now settled that there is no way for one to link "back" to the previous protoshare page?
This really is a problem, simply because mocking up complex popup windows as simply a "state" of another page is sometimes just not enough.

What if :
1) I want to treat my popups with multiple design versions,
2) or I have a popop that needs to be activated from multiple pages,
3) or if I want my clients (the reviewers) to easily access the popup window mockups from the site page tree, and see in the exported documentation
4) or I just want to speed up my prototype loading, by not having to load all popups for a page, at the same time as the page.

All of these would be considerably more difficult or impossible to accomplish without having a "back" button (or similar functionality) on a popup window mockup. Are you sure this is not possible?

M.M.

manimejia
Posts: 16
Joined: Fri May 07, 2010 6:24 am

Re: creat a link that takes one BACK to the previous page.

Postby manimejia » Wed Apr 06, 2011 10:50 am

One possible workaround might be to have a different versions of a "close button" on the popup window page. Each would point to a different "origin" page. If there were "global" template that both the popup and the origin pages shared, then it could have a "Popup Origin" state, which would be set by the origin page, and read by the "close button" links on the popup window page. Each close button link would only be visible if it's target corresponds to the value of "Popup Origin" state.

This might be a workaround, but it looks lik it would require an "on load" action on the origin page to trigger the changing of this "Popup Origin" state. As far as I know, Protoshare does not have the capability to change states "on page load". But that sure would be useful in more than just this scenario.

So we're back to square one.
But it was a good idea.

M.M.

Josh Kristof
Posts: 525
Joined: Tue Mar 31, 2009 3:40 pm

Re: creat a link that takes one BACK to the previous page.

Postby Josh Kristof » Tue Apr 12, 2011 9:11 am

In the next version, this may again be possible. As it is going through the QA process we'll be testing this functionality.
Josh Kristof
customerservice@protoshare.com
Site9, Inc. / Customer Support
blog.protoshare.com | twitter.com/protoshare

manimejia
Posts: 16
Joined: Fri May 07, 2010 6:24 am

Re: creat a link that takes one BACK to the previous page.

Postby manimejia » Tue May 10, 2011 12:15 pm

Thank you!!

The above code works again in the latest release.

Josh Kristof
Posts: 525
Joined: Tue Mar 31, 2009 3:40 pm

Re: creat a link that takes one BACK to the previous page.

Postby Josh Kristof » Tue Jan 22, 2013 10:35 am

The following code should work on the current, 7.0, version of ProtoShare.

Code: Select all

<!DOCTYPE html>
<html>
<head><title></title></head>
<body>
<a href="#" onclick="window.top.history.back(); return false;">Back</a>
</body>
</html>
Josh Kristof
customerservice@protoshare.com
Site9, Inc. / Customer Support
blog.protoshare.com | twitter.com/protoshare


Return to “How Do I...”

Who is online

Users browsing this forum: No registered users and 1 guest

cron