and whent they click same as above it fills out the postal address
how do i make the postal address non editable once the user clicks the same as above box?
Expand|Select|Wrap|Line Numbers
- function sameaddress()
- {
- document.getElementById("st1").value=document.getElementById("street1").value;
- document.getElementById("st2").value=document.getElementById("street2").value;
- document.getElementById("st3").value=document.getElementById("street3").value;
- document.getElementById("city2").value=document.getElementById("city").value;
- document.getElementById("country2").value=document.getElementById("country1").value;
- }
Expand|Select|Wrap|Line Numbers
- <p align="left" class="style1">Physical Address:</p>
- <p align="left" class="style1">Street
- <input name="street1" type="text" value="" size="30" id="street1" />
- </p>
- <p align="left"> <span class="style1">
- <input name="street2" size="30" maxlength="15" value="" type="text" id="street2" />
- </span></p>
- <p align="left"> <span class="style1">
- <input name="street3" size="30" maxlength="15" value="" type="text" id="street3" />
- </span></p>
- <p align="left" class="style1">City
-
- <input name="city" size="30" maxlength="15" value="" type="text" id="city" />
- </p>
- <p align="left" class="style1">Country
- <select name="country1" id="country1">
- <option>NZ</option>
- <option>AU</option>
- <option>UK</option>
- <option>US</option>
- </select>
- </p>
- <p align="left" class="style1">Postal Address:
- <label>Same as above
- <input name="abovebox" type="checkbox" onClick="sameaddress()" />
- </label>
- </p>
- <p align="left" class="style1">Street
- <input name="st1" type="text" value="" size="30" id="st1" />
- </p>
- <p align="left"> <span class="style1">
- <input name="st2" size="30" maxlength="15" value="" type="text" id="st2" />
- </span></p>
- <p align="left"> <span class="style1">
- <input name="st3" size="30" maxlength="15" value="" type="text" id="st3" />
- </span></p>
- <p align="left" class="style1">City
-
- <input name="city2" size="30" maxlength="15" value="" type="text" id="city2" />
- </p>
- <p align="left" class="style1">Country
- <select name="country2" id="country2">
- <option>NZ</option>
- <option>AU</option>
- <option>UK</option>
- <option>US</option>
- </select>
- </p>