Forum Moderators: coopster
... <form enctype="multipart/form-data" method="post" name="webform" onsubmit="return validate(this)" action="<?php echo $_SERVER['PHP_SELF'];?>">
<h2>Title of request:</h2>
<input type="text" tabindex="0" name="request_title" maxlength="255" size="62"
value='<?php echo $_POST['request_title'];?>'
><br><br>
<h2>Please describe your request in detail:</h2><br>
<textarea tabindex="1" name="request_description" cols="87" rows="10" ><?php echo $_POST['request_description'];?></textarea>
<table border="0" cellspacing="3" cellpadding="3">
<tbody>
<tr>
<td><fieldset id="output"><legend>Output Options: </legend>
<input type="checkbox" tabindex="2" id="chb0" name="check_output[]" value="CSV" <?php if(isset($_POST['check_output']) && in_array('CSV', $_POST['check_output'])) echo ' CHECKED ';?>>CSV<br>
<input type="checkbox" tabindex="3" id="chb1" name="check_output[]" value="Excel" <?php if(isset($_POST['check_output']) && in_array('Excel', $_POST['check_output'])) echo ' CHECKED ';?>>Excel<br>
<input type="checkbox" tabindex="4" id="chb2" name="check_output[]" value="Email" <?php if(isset($_POST['check_output']) && in_array('Email', $_POST['check_output'])) echo ' CHECKED ';?>>Email<br>
<input type="checkbox" tabindex="5" id="chb3" name="check_output[]" value="HTML" <?php if(isset($_POST['check_output']) && in_array('HTML', $_POST['check_output'])) echo ' CHECKED ';?>>HTML<br>
<input type="checkbox" tabindex="6" id="chb4" name="check_output[]" value="None" <?php if(isset($_POST['check_output']) && in_array('None', $_POST['check_output'])) echo ' CHECKED ';?>>None<br>
<input type="checkbox" tabindex="7" id="chb5" name="check_output[]" value="PDF" <?php if(isset($_POST['check_output']) && in_array('PDF', $_POST['check_output'])) echo ' CHECKED ';?>>PDF<br>
</fieldset></td>
<td><fieldset> <legend>Frequency: </legend>
<input type="radio" id="rad0" tabindex="8" name="Frequency" value="One Time" <?php echo ($_POST['Frequency']=="One Time")?"CHECKED":""; ?>>One Time<br>
<input type="radio" id="rad1" tabindex="9" name="Frequency" value="Daily" <?php echo ($_POST['Frequency']=="Daily")?"CHECKED":""; ?>>Daily<br>
<input type="radio" id="rad2" tabindex="10" name="Frequency" value="Weekly" <?php echo ($_POST['Frequency']=="Weekly")?"CHECKED":""; ?>>Weekly<br>
<input type="radio" id="rad3" tabindex="11" name="Frequency" value="Monthly" <?php echo ($_POST['Frequency']=="Monthly")?"CHECKED":""; ?>>Monthly<br>
<input type="radio" id="rad4" tabindex="12" name="Frequency" value="Ongoing" <?php echo ($_POST['Frequency']=="Ongoing")?"CHECKED":""; ?>>Ongoing<br>
</fieldset></td>
<td><fieldset> <legend>Request Type: </legend>
<table border="0" cellspacing="3" cellpadding="3">
<tbody>
<tr>
<td><fieldset id="myfieldset"> <legend>Data: </legend>
<input type="radio" id="req0" tabindex="13" name="request_type" value="Add Data" <?php echo ($_POST['request_type']=="Add Data")?"CHECKED":""; ?>>Add<br>
<input type="radio" id="req1" tabindex="14" name="request_type" value="Extract Data" <?php echo ($_POST['request_type']=="Extract Data")?"CHECKED":""; ?>>Extract<br>
<input type="radio" id="req2" tabindex="15" name="request_type" value="Update Data" <?php echo ($_POST['request_type']=="Update Data")?"CHECKED":""; ?>>Update<br>
<input type="radio" id="req3" tabindex="16" name="request_type" value="Validate Data" <?php echo ($_POST['request_type']=="Validate Data")?"CHECKED":""; ?>>Validate<br>
</fieldset></td>
<td><fieldset id="myfieldset"> <legend>Report: </legend>
<input type="radio" id="req4" tabindex="17" name="request_type" value="New Report" <?php echo ($_POST['request_type']=="New Report")?"CHECKED":""; ?>>New<br>
<input type="radio" id="req5" tabindex="18" name="request_type" value="Modify Report" <?php echo ($_POST['request_type']=="Modify Report")?"CHECKED":""; ?>>Modify<br>
</fieldset></td>
<td><fieldset id="myfieldset"> <legend>Table: </legend>
<input type="radio" id="req6" tabindex="19" name="request_type" value="New Table" <?php echo ($_POST['request_type']=="New Table")?"CHECKED":""; ?>>New<br>
<input type="radio" id="req7" tabindex="20" name="request_type" value="Modify Table" <?php echo ($_POST['request_type']=="Modify Table")?"CHECKED":""; ?>>Modify<br>
</fieldset></td>
</tr>
</tbody>
</table>
</fieldset></td></tr>
</tbody>
</table>
<br>
<input type="hidden" value="Created" name="status">
<input type="submit" id="sd" tabindex="24" value="submit" name="submit">
<input type="reset" onclick="resetform();" id="rs" tabindex="25" name="reset" value="reset">
</form>... function resetform(form) {
// resets title
document.forms[0].request_title.value = "";
...
} <input type="button" onclick="emptyform(document.getElementById('check'))" value="Clear form">
function emptyform(field) {
for (i = 0; i < field.length; i++) {
field[i].checked = false;
}
}
onclick="emptyform()"
function emptyform() {
document.getElementById('firstid').checked = false;
document.getElementById('secondid').checked = false;
}
<input type="reset" onclick="resetform();" id="rs" tabindex="25" name="reset" value="reset">
</form>
....
function resetform(form) {
// resets title
document.forms[0].request_title.value = "";
}
<input type="reset" onclick="resetform();" id="rs" tabindex="25" name="reset" value="reset"> <input type="BUTTON" onclick="resetform();" id="rs" tabindex="25" name="reset" value="reset"> My app has a disclaimer in which I require that my users have Javascript enabled.
If they don't...oh well.
My app has a disclaimer in which I require that my users have Javascript enabled.
This page best viewed on Internet Explorer.
To find what you're looking for, scroll down the page. Way down. I mean waaaaay down.
To buy our products, find what you want, payPal us the money, and indicate the items in the comments in payPal.
it is practically "required" to run almost all of the major public websites ( .... facebook, etc;
When I hear "You must/should do this in case Javascript is disabled." It just sounds to me like "You must/should make sure your site design works correctly in IE5."