This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP and have Lucian Maly on-line!
See this thread for details.
Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Return to same position on page after a post.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In an application, on a data entry form to display details of a code
entered the code data is submitted. This leads to a refresh of the page and the viewable area reverts to the top of the page which leads to a lot of inconvenience as the page is quite a long one. Can any one help regarding how to retain the position (viewable area) as was when the data was posted from the page.
- Mohan
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are going to have to make a dynamic target for the form
where you are going to need to add <a href="http://thelink.com<b rel="nofollow">#parts</b>" target="_blank">http://thelink.com#parts to the end of the link.
basically you would have to add information like this on the page:
<a name="parts"></a>
whereever you want the page to be returned to.
Now you can use an onclick in the button to accomplish this:
Make a JavaScript function

Now for the button
<input type="button" name="quack" onclick="AddTarget('parts')">
Now you can figure out the rest
Eric
 
Good heavens! What have you done! Here, try to fix it with this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic