Link to home
Start Free TrialLog in
Avatar of e126319
e126319

asked on

coldfusion position scrollbar

Hi,

I have a page like this,
- the top part is
<cfform>
a form containing serveral textboxes and dropdown lists as filter + a button called "Filter". this button when click will call function to query database
</cfform>

- the second part is
<cfform>
  <table>
      a table to display retrieved records, plus a input column for user to enter comment on each row.
 </table>
 a button called "save" to save comment if there is any.
</cfform>

the retrieved records could be many. my question is when user work on entering comment on record which is close to the page bottom, how can the page go back to the modified record after the page reload due to button "save" click.

Please provide code example in detail since I am new.
Thanks much.
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Give each record a unique id.  then on the server when you go back to the page add #and the id to the end of the page url.


Cd&
Avatar of e126319
e126319

ASKER

Thanks for the reply, I have a javascript function to catch which cmnt field is clicked, and assigned it to a hidden field. could you provide a detailed steps how to use it, a code example?
SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _agx_
(no points, COBOL already answered your question ...)

Are you posting the form to the same page or to a separate action page?
Avatar of e126319

ASKER

save button will save data and refresh the current page. I have a hidden field to keep the clicked field name,  here is what I have
<cfform name="form_Process" method="post" action="index.cfm?page=processWork&###Form.pos#"
pos is the hidden field name, and its value is the clicked field name. when run, I got error "pos is not defined in Form..." how do I reference form field in action property?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial