Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Top of Page Button

MargoBrosnan
Advocate

Does anyone have a custom object that gives the user a button to go to top of page?   I'm hoping there's a server-side function I can use doPostBack with and put the button in the toolbar at the top.  I'd settle for a button I could put at the bottom of the form.  JavaScript isn't my forte and I don't see anything like this on the community.  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

syedtahir16
Advocate

Try this:

 

<a href="#master_DefaultContent_rts_p" style="display:scroll;position:fixed;bottom:20px;right:35px;"> <img src="/Main/company_files/50000/icons/Back to top.jpg" height="45" width="45"></img> </a>

View solution in original post

4 REPLIES 4

syedtahir16
Advocate

Try this:

 

<a href="#master_DefaultContent_rts_p" style="display:scroll;position:fixed;bottom:20px;right:35px;"> <img src="/Main/company_files/50000/icons/Back to top.jpg" height="45" width="45"></img> </a>

Thanks, Syed, this is great!

Actually, one more question.  When the user clicks on the icon and returns to top of page, they lose the ability to see the parent frame (with the key value bolded and the close button).  I tried adding target="_parent" prior to the href attribute, which works, but it seems to confuse Archer.  Once I leave the record, I get an error and have to reload the session.  This is what I'm using in my custom object:

 

<a target="_parent" href="#master_DefaultContent_rts_p" style="display:scroll;position:fixed;bottom:20px;right:35px;"> <img src="../company_files/50000/icons/arrow_up_green.gif" height="35" width="35"></img> </a>

 

Any thoughts?  Thanks!

Not sure what's going on with that code, but as an alternative you could create 2 custom objects.

The first custom object will be your "top -- <a id="top"></a>

The other will be your hyperlink code that you have with a slight modification...

You should be able to use the code you have and set the href="#top" aka the id of the new anchor we created and get rid of the target.