webapp input moving page to anchor link on new page | Community
Skip to main content
bryceh57660644
Level 2
October 16, 2020
Solved

webapp input moving page to anchor link on new page

  • October 16, 2020
  • 2 replies
  • 1643 views

Hey,

 

I have a page where the form is at the bottom and when they submit, that form section is replaced by a thank you confirmation and a couple articles. The problem I am having is that when they click submit, they are taken to the top of the thank you page which has the same content as the form (some information stuff about our products). 

 

Is there a way for me to add a # anchor link to the form upon clicking submit?

 

I tried doing:

<input onclick="#ThankYou;next();">

<input onclick="next();"> <a href="#thankyou">Submit</a></input>

 

Any other suggestions?

Thanks,

Bryce

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

Can just use jquery and skip the anchor. For <a id="thankyou"/>:

window.scrollTo(0, $('#thankyou').offset().top);

 

Thanks,

-Jon 

2 replies

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
October 16, 2020

Hi,

 

Can just use jquery and skip the anchor. For <a id="thankyou"/>:

window.scrollTo(0, $('#thankyou').offset().top);

 

Thanks,

-Jon 

Sukrity_Wadhwa
Community Manager
Community Manager
October 26, 2020

Hi @bryceh57660644,

Were you able to resolve this query with the given solution or do you need more help with it? Do let us know.

Thanks!

Sukrity Wadhwa