Hi,
if you could look at: –
[url]http://www.privatedemo.apc-compunet…ev/1/reg_02.php[/url]
the css file isn’t uploaded btw.
but if you notice i have a clear button on every fieldset, how can i get it to just clear the fields within that fieldset here is the code in full: –
If it is a javascript question i will post again in javascript unless some1 can help
[CODE]
<body>
<?php if(isset($errors) && $errors){ ?>
<?php echo $error_msg; ?><br>
<?php } ?>
<div class=”outsidediv”>
<form method=”post” action=”<?PHP echo “”.$_SERVER[‘PHP_SELF’].”?val=1″; ?>”>
<fieldset>
<legend>Personal Information</legend>
<p class=”form”>
<label>*Salutation:</label>
<select name=”Salutation” tabindex=”1″>
<option value=”Mr” <?PHP if ($_POST[Salutation] == “Mr”) { echo “selected”; } ?>>Mr</option>
<option value=”Miss” <?PHP if ($_POST[Salutation] == “Miss”) { echo “selected”; } ?>>Miss</option>
<option value=”Mrs” <?PHP if ($_POST[Salutation] == “Mrs”) { echo “selected”; } ?>>Mrs</option>
<option value=”Ms” <?PHP if ($_POST[Salutation] == “Ms”) { echo “selected”; } ?>>Ms</option>
<option value=”Dr” <?PHP if ($_POST[Salutation] == “Dr”) { echo “selected”; } ?>>Dr</option>
</select>
</p>
<p class=form>
<label>*First Name:</label>
<input name=”FirstName” type=”text” tabindex=”2″ size=”25″ maxlength=”50″ value=”<?php echo $_POST[‘FirstName’]; ?>”>
</p>
<p class=form>
<label>*Last Name:</label>
<input name=”LastName” type=”text” tabindex=”3″ size=”25″ maxlength=”50″ value=”<?php echo $_POST[‘LastName’]; ?>”>
</p>
<p class=”form”>
<label>*Display Name:</label>
<input name=”DisplayName” type=”text” tabindex=”4″ size=”25″ maxlength=”12″ value=”<?php echo $_POST[‘DisplayName’]; ?>”>
</p>
<p class=”form”>
<label> Gender:</label>
<input name=”OPT_Gender” type=”radio” value=”Male” <?PHP if ($_POST[OPT_Gender] == “Male”) { echo “checked”; } ?> tabindex=”5″>Male
<input name=”OPT_Gender” type=”radio” value=”Female” <?PHP if ($_POST[OPT_Gender] == “Female”) { echo “checked”; } ?> tabindex=”6″>Female
</p>
<p class=”form”>
<label>*Birth Date:</label>
<select name=”DOB_Day” tabindex=”7″>
<option value=”1st” <?PHP if ($_POST[DOB_Day] == “1st”) { echo “selected”; } ?>>1st</option>
</select>
<select name=”DOB_Month” tabindex=”8″>
<option value=”January” <?PHP if ($_POST[DOB_Month] == “January”) { echo “selected”; } ?>>January</option>
</select>
<input name=”N_DOB_Year” type=”text” tabindex=”9″ size=”11″ maxlength=”4″ value=”<?php echo $_POST[‘N_DOB_Year’]; ?>”>
</p>
<p align=”right”>
<input name=”personal” type=”reset” class=”buttons” id=”personal” value=”Clear”>
</p>
</fieldset>
<fieldset>
<legend>Language</legend>
<p class=”form”>
<label>*Default Language:</label>
<select name=”Language” tabindex=”10″>
<option value=”English” <?PHP if ($_POST[Language] == “English”) { echo “selected”; } ?>>English</option>
</select>
</p>
<p align=”right”>
<input name=”language” type=”reset” class=”buttons” id=”language” value=”Clear” src=”<?PHP echo $_SERVER[‘PHP_SELF’]; ?>”>
</p>
</fieldset>
<fieldset>
<legend>Account Information</legend>
<p class=”form”>
<label>*Username:</label>
<input name=”U_Username” type=”text” tabindex=”11″ id=”Username” size=”25″ maxlength=”50″ value=”<?php echo $_POST[‘U_Username’]; ?>”>
</p>
<p class=”form”>
<label>*Password:</label>
<input name=”P_Password” type=”password” tabindex=”12″ id=”Password” size=”25″ maxlength=”50″ value=”<?php echo $_POST[‘P_Password’]; ?>”>
</p>
<p class=”form”>
<label>*Retype Password:</label>
<input name=”OPT_Password_Retype” type=”password” tabindex=”13″ id=”Password Retype” size=”25″ maxlength=”50″ value=”<?php echo $_POST[‘OPT_Password_Retype’]; ?>”>
</p>
<p class=”form”>
<label>*Email Address:</label>
<input name=”E_EmailAddress” type=”text” id=”E_EmailAddress” tabindex=”14″ size=”37″ maxlength=”150″ value=”<?php echo $_POST[‘E_EmailAddress’]; ?>”>
</p>
<p align=”right”>
<input name=”account” type=”reset” class=”buttons” id=”account” value=”Clear” src=”<?PHP echo $_SERVER[‘PHP_SELF’]; ?>”>
</p>
</fieldset>
<?php
if ($Type == “B”) {
?>
<fieldset>
<legend>Business Information</legend>
<p class=”form”>
<label>*Business Name:</label>
<input name=”BusinessName” type=”text” tabindex=”1″ size=”25″ maxlength=”50″ value=”<?php echo $_POST[‘BusinessName’]; ?>”>
</p>
<p class=”form”>
<label>*Trading Name:</label>
<input name=”TradingName” type=”text” tabindex=”2″ size=”25″ maxlength=”50″ value=”<?php echo $_POST[‘TradingName’]; ?>”>
</p>
<p class=”form”>
<label>*Display Name:</label>
<input name=”BusinessDisplayName” type=”text” tabindex=”3″ size=”25″ maxlength=”12″ value=”<?php echo $_POST[‘BusinessDisplayName’]; ?>”>
</p>
<p align=”right”>
<input name=”Address” type=”reset” class=”buttons” id=”Address” value=”Clear” src=”<?PHP echo $_SERVER[‘PHP_SELF’]; ?>”>
</p>
</fieldset>
<?php
}
?>
<fieldset>
<legend>Address Information</legend>
<p class=”form”>
<label>*Address Line 1:</label>
<input name=”Address1″ type=”text” tabindex=”1″ size=”37″ maxlength=”50″ value=”<?php echo $_POST[‘Address1’]; ?>”>
</p>
<p class=”form”>
<label>*Town / City:</label>
<input name=”town” type=”text” tabindex=”1″ size=”25″ maxlength=”50″ value=”<?php echo $_POST[‘town’]; ?>”>
</p>
<p class=”form”>
<label>*Country:</label>
<select name=”country” id=”country” onChange=”popStates()” tabindex=”2″>
<option selected>Please Select</option>
<option value=”USA”>USA</option>
<option value=”United States”>England</option>
<option value=”Canada”>Canada</option>
</select>
</p>
<div id=”statedisplay”>
<p class=”form”>
<label id=”statelbl”>*State:</label>
<select name=’slctState’ id=’slctState’ tabindex=”3″>
<option selected>Please Select</option>
</select>
</p>
</div>
<p class=”form”>
<label id=”postcodelbl”>*Postcode:</label>
<input name=”Postcode” type=”text” tabindex=”4″ id=”Postcode” size=”14″ maxlength=”10″>
</p>
<p align=”right”>
<input name=”Address” type=”reset” class=”buttons” id=”Address” value=”Clear” src=”<?PHP echo $_SERVER[‘PHP_SELF’]; ?>”>
</p>
</fieldset>
<p class=”proccess”>
<input name=”clear” type=”reset” tabindex=”4″ class=”buttons” value=”Clear All”>
<input name=”next” type=”submit” tabindex=”5″ class=”buttons” id=”next” value=”Confirm”>
</p>
</form>
</div>
</body>
Thanks
Adam
p.s. sorry about the long code ?