To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
I'm creating a subscription form and i like to know how to create an interactive submit button.
What i want is a submit button which only can be used when they agree with the terms of conditions by checking a checkbox. Can u please tell me how i can do that???
This is the topic where u should post your question: ClientSide Technologies
Discuss HTML/CSS/Javascript, and any other client-side technologies, here.
About the question:
There is disable <-- javascript event ...
__________________
/**
* The answer is so obvious, duh!
* It's like, whatever ...
*
* If your problem has been solved, PLEASE click the RESOLVED LINK under "Thread Tools"
*/
Ohw, i'm sorry.
Im new(in coding PHP) and here at this forum and hoped there was something like this in php.
But i will look at the other topic to get some more result about the disable JAVASCRIPT EVENT. But thanx a lot for giving me some direction. I thought this would be the simplest part of my PHP form but never is ever like it seems...
__________________
/**
* The answer is so obvious, duh!
* It's like, whatever ...
*
* If your problem has been solved, PLEASE click the RESOLVED LINK under "Thread Tools"
*/
__________________
/**
* The answer is so obvious, duh!
* It's like, whatever ...
*
* If your problem has been solved, PLEASE click the RESOLVED LINK under "Thread Tools"
*/
I am so grateful you showed us an example - wasn't sure where to look. For some reason when I tick the box to accespt the terms my button doesn't display.
I have done the same as your example.
HTML Code:
<p><input type="checkbox" name="chk" value="1" onclick="return _DoSomething(this);" />Check to accept agreement. <a href="terms.php" target="_blank">View end user licence agreement</a></p><p><input type="submit" name="btn" value="Sign Up!" disabled /></p></form>
I don't see any <form></form> tags in your HTML code example... for bogu's code to work properly, the checkbox and submit button must be placed inside a form (the first form on the page, in fact).
EDIT: Correction, I see an ending </form> tag, but no beginning <form> tag.
__________________
***If your problem has been solved, PLEASE click the RESOLVED LINK under "Thread Tools"***
"Well Bones, do the new medical facilities meet with your approval?" -- Kirk
"They do not. It's like working in a damn computer center" -- McCoy (Star Trek: TMP)
I haven't included them because i didn't want to include the entire form but yes they are in form tags.
Here is the form:
PHP Code:
<table border="0" cellspacing="0" cellpadding="0" width="450">
<tr>
<td class="pageName">Register as an Individual <p> </p></td>
</tr>
<tr><?php
include("Connections/conn.php");
$regions = @mysql_query('SELECT id, name FROM region ORDER BY name ASC');
if (!$regions) {
exit('<p>Unable to obtain region list from the database.</p>');
}
</fieldset>
<p><strong>To verify your registration please answer the following question:</strong>
There are 3 colours on the aboriginal flag; black, yellow and ...?</br>(Type the other colour on the flag in the box below.) </p>
<p><input type="text" name="logic" value="<?php echo @$logic ?>" /></p>
<p><input type="checkbox" name="chk" value="1" onclick="return _DoSomething(this);" />Check to accept agreement. <a href="terms.php" target="_blank">View end user licence agreement</a></p>
Okay.. and where do you define the _DoSomething JS function in your code?
__________________
***If your problem has been solved, PLEASE click the RESOLVED LINK under "Thread Tools"***
"Well Bones, do the new medical facilities meet with your approval?" -- Kirk
"They do not. It's like working in a damn computer center" -- McCoy (Star Trek: TMP)