Link to home
Start Free TrialLog in
Avatar of stu215
stu215Flag for United States of America

asked on

Enable Checkbox upon Scrollbar Reaching Bottom : Ensure user has read guidelines

I have an <iframe> that loads a page with all of my guidelines for the workplace.

Before being allowed to click on :
       _
      |_| I agree to the terms stated above.

I would like to make it mandatory that the user scroll to the bottom of the iframe (guidelines).

~Stu
ASKER CERTIFIED SOLUTION
Avatar of darksinclair
darksinclair

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 darksinclair
darksinclair

unfortunately other than that entry or placing a check box at the end and asking them to select the box before they may proceed, there is no API or function in Javascript (or VB, or ASP that I've ever seen) that Can do this for you.
Sorry M8t,

Cheers,
Avatar of stu215

ASKER

Yea, I saw that one but was wondering if there was a way to detect the scrollbar reaching bottom / using iframes
because then it makes it easier to update the content i want displayed in the form page.

[ Will ensure that the person who is updating the guidelines doesnt mess up my programming by having them work with just a text file ]

~Stu
cant u hv the chkbox after the guidelines? ;)

guide ---------
guide ---------
guide ---------
guide ---------
guide ---------
guide ---------
[ ] i agree to the above lines

:)
Don
if u are using asp u can just include the text file and then response.write ur checkbox
Avatar of stu215

ASKER

I do have the checkbox after the guidelines however I want the user to scroll to the bottom of them and then activate the box.

Problem = How to determine when the scrollbar is at absolute bottom & to activate my function ChkStatus(); which will activate or de-activate the checkbox.

How it looks :
-------------------------------------------------------------------------------------------------------------
<tr bgcolor="CCCCCC"><td><b>Section D: Standard Operating Procedures</b></td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td><b>You MUST read (scroll to the bottom) of the following guidelines to activate the checkbox below:</b></td></tr>
<tr>
      <td>
      <ul>
      <iframe frameborder="1" height="150" width="652" scrolling="yes" src="Operating_Procedures.txt"></iframe>
      <br><br>
      <input name="StdOps" type="checkbox" disabled="true" value="Yes">
      <b>I agree to adhere to the guidelines stated above.</b>
      </ul>
      </td>
</tr>
-------------------------------------------------------------------------------------------------------------

Ive modified the thing from the link Darksinclair put up (which works) by pasting my "OperatingProcedures" file in place of the "BLAHBLAHBLAH"  and by adding a function to activate/de-activate the box,  but id really like to be able to keep "OperatingProcedures" as a seperate file so that it can be modified by people with no programming experience.

Would mean less upkeep for me...

~Stu
What you'd need then is to put "OperatingProcedures in its own file and include that file as it is.. So simple plain text in the OperatingProcedures file and then include it in that frame.  in order to minimize the upkeep, if you have an administrator log in, set up a text editor being able to modify that file and save the changes to the file.  I've never done this in Javascript... but it should be fairly simple in whatever other language your writing in.

Cheers M8t,

Pf
Avatar of stu215

ASKER

They have access to a specific folder on the server (IIS) so they can modify stuff in the one folder they have access to with whatevr editor they please.

I dont know how to determine when the scrollbar is at the bottom of that (frame or whatevr i put it in) to be able to have my script enable / disable the checkbox ...

~Stu :-P
stu215, I do not believe there is a control event for when someone moves the scrollbar.

Sorry mate.