473,785 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accepting Terms and Conditions (textarea/radio button)

Rob
Hi all,

I would like to have a textarea control on my web page that is complete
with terms and conditions, in addition, I would like a radio button
beneath this to indicate the acceptance of these terms and conditions.

The part which I am struggling to find information online about is how
to only activate the radio button (ie, prior to this event its
disabled) when the user has scrolled to the bottom of the textarea.

I've seen this done a lot when I'm installing programs via Windows, and
I'm sure someone must have come up with a way to do this via the web
also?

It obviously cannot involve in anyway the user actually clicking "in"
the textarea to get the position of the cursor, it would have to be
based on a "scroll to the bottom" as such...

Any information would be appreciated.

Best regards

Rob

Nov 8 '06 #1
6 5738
Rob said the following on 11/8/2006 12:02 PM:
Hi all,

I would like to have a textarea control on my web page that is complete
with terms and conditions, in addition, I would like a radio button
beneath this to indicate the acceptance of these terms and conditions.

The part which I am struggling to find information online about is how
to only activate the radio button (ie, prior to this event its
disabled) when the user has scrolled to the bottom of the textarea.

I've seen this done a lot when I'm installing programs via Windows, and
I'm sure someone must have come up with a way to do this via the web
also?

It obviously cannot involve in anyway the user actually clicking "in"
the textarea to get the position of the cursor, it would have to be
based on a "scroll to the bottom" as such...

Any information would be appreciated.
Instead of a textarea, use an IFrame and put the checkbox at the bottom
of the IFrame page. They can't click it without at least scrolling to
the bottom of it to even find the checkbox.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 8 '06 #2
Rob
Randy Webb wrote:
Instead of a textarea, use an IFrame and put the checkbox at the bottom
of the IFrame page. They can't click it without at least scrolling to
the bottom of it to even find the checkbox.
Hi Randy,

Thank you for your reply.

I hadn't thought of that approach, not entirely sure how'd I'd pick up
on the event of the button being ticked in my .net page - but that
aside, does this mean that the way I descibed is not possible?

Regards

Rob

Nov 9 '06 #3
VK

Rob wrote:
Randy Webb wrote:
Instead of a textarea, use an IFrame and put the checkbox at the bottom
of the IFrame page. They can't click it without at least scrolling to
the bottom of it to even find the checkbox.

Hi Randy,

Thank you for your reply.

I hadn't thought of that approach, not entirely sure how'd I'd pick up
on the event of the button being ticked in my .net page - but that
aside, does this mean that the way I descibed is not possible?
textarea element on IE has onscroll event handler so that would be
easy: but this handler is not implemented on other UA's.

So you may shoose a styled (overflow:scrol l) block container (div or
pre), listen events for it, study scrollTop property and handle
buttonObject.di sabled = 'false' for buttons located below that
container.

Nov 9 '06 #4
Rob said the following on 11/9/2006 6:53 AM:
Randy Webb wrote:
>Instead of a textarea, use an IFrame and put the checkbox at the bottom
of the IFrame page. They can't click it without at least scrolling to
the bottom of it to even find the checkbox.

Hi Randy,

Thank you for your reply.

I hadn't thought of that approach, not entirely sure how'd I'd pick up
on the event of the button being ticked in my .net page
onclick of the checkbox/radio button, you set a form field in the parent
page and check that field in your .net page.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 10 '06 #5
Rob
Thanks for all of the replies and info.

Regards

Rob

Nov 10 '06 #6

Rob wrote:
Thanks for all of the replies and info.
If this thanks do not mean that you solve problem:)
Check whether container is scrolled to the bottom and then allow to
check radio button "I agree", otherwise - show warning.

<html>
<head>
<script type=text/javascript>
function check(sender)
{
var terms = document.getEle mentById("terms ");
if (terms.scrollHe ight-terms.scrollTop terms.clientHei ght)
{
sender.checked = false;
alert("Read terms");
}
}
</script>
</head>
<body>
<div id="terms"
style="width:30 0px;height:100p x;overflow:auto ;border:solid 1px black">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Sed volutpat tellus sed neque. Mauris libero quam, interdum
pellentesque, malesuada in, viverra vitae, nisi.
Integer posuere commodo orci. Etiam scelerisque lectus eu tellus.
Integer bibendum sem sed metus.
In enim mauris, vehicula vel, adipiscing a, consectetuer sit amet,
nunc. Curabitur eget elit.
</div>
<br>
<input type="radio" onclick="check( this)" name="agree">I argree
</body>
</html>

Nov 10 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9334
by: Doug van Vianen | last post by:
Hi, I am working on an Applet which provides some mouse practice for new computer users in our local seniors' computer club. The applet contains several cards, in a card layout, which are displayed to the user one after the other as needed to present some particular mouse operation. This all works fine. One card (card 4 below) includes a textarea and a button. What I wish to do is have the user use the mouse to select some text from the...
2
11210
by: Ritesh Shah | last post by:
Is there anyway in JavaScript to hide/show a textarea based on what radio button is selected? I am totally new to JavaScript and have no idea about any of it. Thanks.
4
3282
by: Oscar Monteiro | last post by:
I Have to sets of Radio buttons like so: <input type="radio" name=p1 value=1> <input type="radio" name=p1 value=2> <input type="radio" name=p1 value=3> <br> <input type="radio" name=p2 value=1> <input type="radio" name=p2 value=2> <input type="radio" name=p2 value=3> then a text area and a button:
2
9670
by: danielboendergaard | last post by:
Hey Im making a homepage in php. I use a html form to put data into mysql and i want to make some buttons which inserts user input values into a textarea. I have used a button like this: <input type="button" value="Add Quote" onclick="document.getElementById('nyhed').value+=''"> The button works fine and insterts into the textarea. Although I want to make a button which onclick asks the user for a
10
6104
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
1
2142
by: snipersix | last post by:
How do you display values in a textarea using javascript. ex. i have 2 radio buttons o Adult =$9.99 o Child =$6.99 i need it to be, so that if i select adult in the radio button option , it will display 9.99 in my textarea at the other frame. Cause im using 2 frames for this html file. The radio buttons are at the left frame and the textarea is at the right frame.
3
8286
by: Syswatch | last post by:
Hi out there... I am pretty new to javascript, and is looking for some help here. I have a problem, I need a small javascript, which checks if there is any text in my textarea, and if it is NOT empty it should activate 2 radio buttons below. It also has to check that one of these radio buttons is checked if they are active. Can some help me out here....
3
7877
by: santhosh89 | last post by:
hi guys, see i want to develop a script and developed one but it s not working. the concept is there will be three radio buttons. the user has to check one radio button and click the button next to it. there will be a text area below that as soon as the submit button is clicked based on what radio button is clicked the text should appear in the text area. this is script what i created function present(display) { var text1="<a...
1
3535
by: jmkc888 | last post by:
Hi All, I have developed a small application and wish to make it available as free download on the internet. 1. On the Home page, when the user clicks on "Download" button, the Terms Of Use page opens.
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.