All pastes #776178 Raw Edit

Untitled

public javascript v1 · immutable
·published 2007-11-15 22:28 UTC
rendered paste body
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>ID Builder &raquo; Start - NovaVision</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><script src="/ui/js/mootools.v1.11.js" type="text/javascript"></script>window.onload = init;function init() {//$('photo_preview').style.width = '200px';//$('photo_preview').style.display = 'inline';$('shipping_same').addEvent('click', billingIsShipping);}function billingIsShipping(evt) {	var clickEvent = new Event(evt);	if(clickEvent.target.getProperty('checked') != 'checked') {		$$('#billing_info input').each(function(field) {			var fieldId = field.getProperty('id');//.substr(8);			$('shipping_'+fieldId).value = $(fieldId).value;		});	} else {		$$('#billing_info input').each(function(field) {			var fieldId = field.getProperty('id');//.substr(8);			$('shipping_'+fieldId).value = '';		});	}}<body><table width="650" border="0" align="center">    <tr>      <td width="295" align="left" valign="top"><h3>Billing Address</h3>        <div id="billing_info">          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $name == FALSE) { echo ' class="red"'; } ?>>Full Name:              <input name="name" type="text" id="name" tabindex="1" value="<?php if (isset($_SESSION['posted_values']['name'])) echo stripslashes($_SESSION['posted_values']['name']); ?>" />              </label>          </p>          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $address == FALSE) { echo ' class="red"'; } ?>>Address:              <input name="address" type="text" id="address" tabindex="2" value="<?php if (isset($_SESSION['posted_values']['address'])) echo stripslashes($_SESSION['posted_values']['address']); ?>" />              </label>          </p>          <p>            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              <input name="address2" type="text" id="address2" tabindex="3" value="<?php if (isset($_SESSION['posted_values']['address2'])) echo stripslashes($_SESSION['posted_values']['address2']); ?>" />              </label>          </p>          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $city == FALSE) { echo ' class="red"'; } ?>>City:              <input name="city" type="text" id="city" tabindex="4" value="<?php if (isset($_SESSION['posted_values']['city'])) echo stripslashes($_SESSION['posted_values']['city']); ?>" />              </label>          </p>          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $state == FALSE) { echo ' class="red"'; } ?>>State:              <input name="state" type="text" id="state" tabindex="5" value="<?php if (isset($_SESSION['posted_values']['state'])) echo stripslashes($_SESSION['posted_values']['state']); ?>" size="4" maxlength="2" />              </label><label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $zip == FALSE) { echo ' class="red"'; } ?>>Zip:                <input name="zip" type="text" id="zip" tabindex="6" value="<?php if (isset($_SESSION['posted_values']['zip'])) echo stripslashes($_SESSION['posted_values']['zip']); ?>" size="10" maxlength="5" />                </label>          </p>          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $phone == FALSE) { echo ' class="red"'; } ?>>Phone:              <input type="text" name="phone" id="phone" tabindex="7" value="<?php if (isset($_SESSION['posted_values']['phone'])) echo stripslashes($_SESSION['posted_values']['phone']); ?>" />              </label>          </p>        </div>        <p>          <label>            <input type="checkbox" name="shipping_same" id="shipping_same" value="1" tabindex="8" />            Shipping address is the same as the billing address</label>          </p>        <p>&nbsp; </p></td>      <td width="295" align="left" valign="top"><h3>Shipping Address</h3>        <div id="shipping_info">          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $shipping_name == FALSE) { echo ' class="red"'; } ?>>Full Name:              <input name="shipping_name" type="text" id="shipping_name" tabindex="9" value="<?php if (isset($_SESSION['posted_values']['shipping_name'])) echo stripslashes($_SESSION['posted_values']['shipping_name']); ?>" />              </label>          </p>          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $shipping_address == FALSE) { echo ' class="red"'; } ?>>Address:              <input name="shipping_address" type="text" id="shipping_address" tabindex="10" value="<?php if (isset($_SESSION['posted_values']['shipping_address'])) echo stripslashes($_SESSION['posted_values']['shipping_address']); ?>" />              </label>          </p>          <p>            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              <input name="shipping_address2" type="text" id="shipping_address2" tabindex="11" value="<?php if (isset($_SESSION['posted_values']['shipping_address2'])) echo stripslashes($_SESSION['posted_values']['shipping_address2']); ?>" />              </label>          </p>          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $shipping_city == FALSE) { echo ' class="red"'; } ?>>City:              <input name="shipping_city" type="text" id="shipping_city" tabindex="12" value="<?php if (isset($_SESSION['posted_values']['shipping_city'])) echo stripslashes($_SESSION['posted_values']['shipping_city']); ?>" />              </label>          </p>          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $shipping_state == FALSE) { echo ' class="red"'; } ?>>State:              <input name="shipping_state" type="text" id="shipping_state" tabindex="13" value="<?php if (isset($_SESSION['posted_values']['shipping_state'])) echo stripslashes($_SESSION['posted_values']['shipping_state']); ?>" size="4" maxlength="2" />              </label><label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $shipping_zip == FALSE) { echo ' class="red"'; } ?>>Zip:                <input name="shipping_zip" type="text" id="shipping_zip" tabindex="14" value="<?php if (isset($_SESSION['posted_values']['shipping_zip'])) echo stripslashes($_SESSION['posted_values']['shipping_zip']); ?>" size="10" maxlength="5" />                </label>          </p>          <p>            <label<? if($_SERVER['REQUEST_METHOD'] == 'POST' && $shipping_phone == FALSE) { echo ' class="red"'; } ?>>Phone:              <input type="text" name="shipping_phone" tabindex="15" value="<?php if (isset($_SESSION['posted_values']['shipping_phone'])) echo stripslashes($_SESSION['posted_values']['shipping_phone']); ?>" />              </label>          </p>        </div>        <p>Note: If the shipping address differs from the billing, you will need          to enter this in again when entering your credit card details on the          payment site.  </p></td>    </tr>  </table></html></body>