activate.html HTML Source View

<!!DOCTYPE html>>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<title>Wireless Tag List</title>
	<link rel="stylesheet" href="styles/" />
	<link rel="stylesheet" href="styles/eth.css" />
	<script src="styles/jquery-1.6.4.min.js" type="text/javascript"></script> 
	<script src="styles/" type="text/javascript"></script> 
	<div data-role="page" id="activatePage">
		<div data-role="header" data-theme="d" data-position="inline">
			<a href="index.html" data-ajax="false" data-icon="delete" data-iconpos="notext">Cancel</a>
				Activate an Internet Tag Manager</h1>
		<div data-role="content" data-theme="c">
				Create an account for accessing your Tag Manager</p>
			<form action="" method="post" id="signupform" data-ajax="false" class="ui-body ui-body-c ui-corner-all">
			<div data-role="fieldcontain">
				<label for="mac">Tag Manager Serial Number:</label>
				<input type="text" name="mac" id="mac" value=""/>
			<div data-role="fieldcontain">
				<label for="managerName">Name this manager (e.g. Home):</label>
				<input type="text" name="managerName" id="managerName" value=""/>
			<fieldset class="ui-corner-all"><legend>Create a User Account for this Tag Manager</legend>
				<div data-role="fieldcontain">
					<label for="email">Email:</label>
					<input type="email" name="email" id="email" value="" />
				<div data-role="fieldcontain">
					<label for="pwd1">Choose a Password:</label>
					<input type="password" name="pwd1" id="pwd1" value=""  />
				<div data-role="fieldcontain">
					<label for="pwd2">Retype the Password:</label>
					<input type="password" name="pwd2" id="pwd2" value="" />
				<input type="checkbox" id="allowmore" class="custom" />
				<label for="allowmore">	Allow creating more accounts to access this Tag Manager</label>
			<button data-inline="1" data-icon="check" type="submit" data-theme="b" id="submitBtn">
			<a data-role="button" data-ajax="false" data-inline="1" data-icon="delete" data-theme="c" href='index.html'>
		<div data-role="header" data-position="inline">
				Wireless Tag List</h1>
			<a href="" data-icon="info" data-iconpos="notext" data-ajax="false"
	<script src="styles/client.js" type="text/javascript"></script> 
	<script type="text/javascript">

		$("#activatePage").live("pagebeforecreate", function () {
			var ua = navigator.userAgent.toLowerCase();
			if (ua.indexOf("iphone") != -1 || ua.indexOf("ipod") != -1) {

				$.each([$("#email"), $("#managerName"), $("#pwd1"), $("#mac"), $("#pwd2")], function (i, o) {
					var lb = o.parent().children("label").eq(0);
					lb.hide(); o.attr("placeholder", lb.text().replace(":", ""));

		$("#mac").blur(function (event) { = $(; });
		$("#mac").blur({ regex: "^\\S{12}$", message: "Serial number is 12 character long.", remote: "ethAccount.asmx/GetTagManagerName", remote_retval: "#managerName" }, validate);
		$("#email").blur({ regex: "^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[-a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$",
			message: "Valid email address required for password recovery."
		}, validate);
		$("#managerName").blur({ regex: "^\\S{2,}$", message: "name must be at least 3 characters" }, validate);
		$("#pwd1").blur({ regex: "^\\S{3,}$", message: "password must be at least 3 characters" }, validate);
		$("#pwd2").blur({ match: "#pwd1", message: "passwords must match" }, validate);
		$("#signupform").submit(function (event) {
			$("#signupform input").trigger('blur');
			if ($("label.error").length == 0) {
				var btn = $("#submitBtn");
				var oldhtml = show_finding(btn, "Creating...");
				var mac = $("#mac").val(); var email = $('#email').val(); var pwd = $('#pwd1').val(); var allowmore = $("#allowmore").is(":checked");
					url: WSROOT + "ethAccount.asmx/CreateAccount3",
					data: JSON.stringify({ "MAC": mac, "email": email, "password": pwd, "allowMore": allowmore, "managerName": $("#managerName").val(), 'facebook_auth': }),
					success: function (retval, textStatus) {
						location.href = 'index.html';
					error: function (xhr, textStatus, exception) {
						restore_finding(btn, oldhtml);
						popup_error(xhr, btn);