Advertisement
Guest User

Untitled

a guest
Oct 8th, 2019
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.84 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.  
  7.  
  8.  
  9. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
  10. <link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.css" rel="stylesheet" type='text/css'>
  11. <link href="/Content/Site.css" rel="stylesheet">
  12. <link href="/Content/bootstrap.css" rel="stylesheet">
  13.  
  14.  
  15.  
  16. <script src="/Scripts/jquery-3.4.1.js"></script>
  17.  
  18.  
  19. <script type="text/javascript">
  20. function show() {
  21. document.getElementById("btn-Search").style.display = 'inline-block';
  22. };
  23. $(document).ready(function () {
  24. $("#inpSearch").focus(function () {
  25. $(".close-btn").addClass("active");
  26. });
  27.  
  28. $("#inpSearch").focusout(function () {
  29. $(".close-btn").removeClass("active");
  30. $(this).val("");
  31. });
  32.  
  33. $('#inpSearch').on('keyup', function(e){
  34. if (e.keyCode === 13) {
  35. var baseUrl = '/Home/search/'
  36. var url = baseUrl + $('#inpSearch').val();
  37. window.location.href = "/Home/search?inpSearch=" + $('#inpSearch').val();
  38. }
  39. })
  40. });
  41. $(function () {
  42. $("#btnHome").hover(
  43. function () { //mouse over
  44. $(this).children('img').attr("src", "/XImages/home7.png");
  45. },
  46. function () { //mouse Out
  47. $(this).children('img').attr("src", "/XImages/home-512.png");
  48. }
  49. )
  50. });
  51. $(function () {
  52. $("#btnTypeGrocery").hover(
  53. function () { //mouse over
  54. $(this).children('img').attr("src", "/XImages/grocery5.png");
  55. },
  56. function () { //mouse Out
  57. $(this).children('img').attr("src", "/XImages/grocery1.png");
  58. }
  59. )
  60. });
  61. $(function () {
  62. $("#btnShopOnline").hover(
  63. function () { //mouse over
  64. $(this).children('img').attr("src", "/XImages/shope_online.png");
  65. },
  66. function () { //mouse Out
  67. $(this).children('img').attr("src", "/XImages/shope_online0.png");
  68. }
  69. )
  70. });
  71. $(function () {
  72. $("#btnDeliveryDate").hover(
  73. function () { //mouse over
  74. $(this).children('img').attr("src", "/XImages/Delivery.png");
  75. },
  76. function () { //mouse Out
  77. $(this).children('img').attr("src", "/XImages/Delivery0.png");
  78. }
  79. )
  80. });
  81. $(function () {
  82. $("#btnRegister").hover(
  83. function () { //mouse over
  84. $(this).children('img').attr("src", "/XImages/key1.png");
  85. },
  86. function () { //mouse Out
  87. $(this).children('img').attr("src", "/XImages/key.png");
  88. }
  89. )
  90. });
  91. $(function () {
  92. $("#cartLi").mouseenter(function () {
  93. $("#cartLi a img").attr("src", "/XImages/cart_completed1.png");
  94. });
  95. })
  96. function autocomplete(inp, arr) {
  97. /*the autocomplete function takes two arguments,
  98. the text field element and an array of possible autocompleted values:*/
  99. var currentFocus;
  100. /*execute a function when someone writes in the text field:*/
  101. inp.addEventListener("input", function(e) {
  102. var a, b, i, val = this.value;
  103. /*close any already open lists of autocompleted values*/
  104. closeAllLists();
  105. if (!val) { return false;}
  106. currentFocus = -1;
  107. /*create a DIV element that will contain the items (values):*/
  108. a = document.createElement("DIV");
  109. a.setAttribute("id", this.id + "autocomplete-list");
  110. a.setAttribute("class", "autocomplete-items");
  111. /*append the DIV element as a child of the autocomplete container:*/
  112. this.parentNode.appendChild(a);
  113. /*for each item in the array...*/
  114. for (i = 0; i < arr.length; i++) {
  115. /*check if the item starts with the same letters as the text field value:*/
  116. if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
  117. /*create a DIV element for each matching element:*/
  118. b = document.createElement("DIV");
  119. /*make the matching letters bold:*/
  120. b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
  121. b.innerHTML += arr[i].substr(val.length);
  122. /*insert a input field that will hold the current array item's value:*/
  123. b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
  124. /*execute a function when someone clicks on the item value (DIV element):*/
  125. b.addEventListener("click", function(e) {
  126. /*insert the value for the autocomplete text field:*/
  127. inp.value = this.getElementsByTagName("input")[0].value;
  128. /*close the list of autocompleted values,
  129. (or any other open lists of autocompleted values:*/
  130. closeAllLists();
  131. });
  132. a.appendChild(b);
  133. }
  134. }
  135. });
  136. /*execute a function presses a key on the keyboard:*/
  137. inp.addEventListener("keydown", function(e) {
  138. var x = document.getElementById(this.id + "autocomplete-list");
  139. if (x) x = x.getElementsByTagName("div");
  140. if (e.keyCode == 40) {
  141. /*If the arrow DOWN key is pressed,
  142. increase the currentFocus variable:*/
  143. currentFocus++;
  144. /*and and make the current item more visible:*/
  145. addActive(x);
  146. } else if (e.keyCode == 38) { //up
  147. /*If the arrow UP key is pressed,
  148. decrease the currentFocus variable:*/
  149. currentFocus--;
  150. /*and and make the current item more visible:*/
  151. addActive(x);
  152. } else if (e.keyCode == 13) {
  153. /*If the ENTER key is pressed, prevent the form from being submitted,*/
  154. e.preventDefault();
  155. if (currentFocus > -1) {
  156. /*and simulate a click on the "active" item:*/
  157. if (x) x[currentFocus].click();
  158. }
  159. }
  160. });
  161. function addActive(x) {
  162. /*a function to classify an item as "active":*/
  163. if (!x) return false;
  164. /*start by removing the "active" class on all items:*/
  165. removeActive(x);
  166. if (currentFocus >= x.length) currentFocus = 0;
  167. if (currentFocus < 0) currentFocus = (x.length - 1);
  168. /*add class "autocomplete-active":*/
  169. x[currentFocus].classList.add("autocomplete-active");
  170. }
  171. function removeActive(x) {
  172. /*a function to remove the "active" class from all autocomplete items:*/
  173. for (var i = 0; i < x.length; i++) {
  174. x[i].classList.remove("autocomplete-active");
  175. }
  176. }
  177. function closeAllLists(elmnt) {
  178. /*close all autocomplete lists in the document,
  179. except the one passed as an argument:*/
  180. var x = document.getElementsByClassName("autocomplete-items");
  181. for (var i = 0; i < x.length; i++) {
  182. if (elmnt != x[i] && elmnt != inp) {
  183. x[i].parentNode.removeChild(x[i]);
  184. document.getElementById("inpSearch").style.borderRadius = '1em';
  185. }
  186. }
  187. }
  188. /*execute a function when someone clicks in the document:*/
  189. document.addEventListener("click", function (e) {
  190. closeAllLists(e.target);
  191. });
  192. }
  193. </script>
  194. </head>
  195. <body>
  196. <main>
  197. <div id="container3">
  198. <div id="container2">
  199. <div id="container1">
  200. <div id="col1">
  201.  
  202. </div>
  203. <div id="col2" style="padding-bottom: 20%">
  204. <div id="searchform">
  205. <center style="height: 100%">
  206. <div id="searchContainer">
  207.  
  208. <input oninput="autocompl()" autocomplete="off" name="inpSearch" id="inpSearch" type="text" spellcheck="true" placeholder="Search here..." />
  209. <div class="close-btn">&times;</div>
  210.  
  211. </div>
  212. </center>
  213. </div>
  214. <ul id="tm">
  215. <li>
  216. <a id="btnHome" href="/" role="link" title="Home">
  217. <img src="/XImages/home-512.png" alt="home1.png" />
  218. <span>Home</span>
  219. </a>
  220. </li>
  221. <li>
  222. <a href="/Home/CreateAGroceryList" id="btnTypeGrocery">
  223. <img src="/XImages/grocery1.png" alt="grocery.png" />
  224. <span>Type Grocery List</span>
  225. </a>
  226. </li>
  227. <li class="menuItem" id="shopOnline">
  228. <a href="/Home/Browse" id="btnShopOnline">
  229. <img src="/XImages/shope_online0.png" alt="shop.png" />
  230. <span>Shop Online</span>
  231. </a>
  232. </li>
  233. <li id="deliveryDate">
  234. <a href="/Home/SetDeliveryDate" id="btnDeliveryDate">
  235. <img src="/XImages/Delivery0.png" alt="setDelivery.png" />
  236. <span>Set Delivery Date</span>
  237. </a>
  238. </li>
  239. <li id="registerLi">
  240. <a href="/Account/Login" id="btnRegister">
  241. <img src="/ximages/key.png" alt="register.png" />
  242. <span>Login / Register</span>
  243.  
  244. </a>
  245. </li>
  246. <li id="cartLi">
  247. <a href="/ShoppingCart/Index" id="btnCart">
  248. <img src="/XImages/cart_completed.png" alt="cart_completed1.png" />
  249. <span>My Cart</span>
  250. </a>
  251. </li>
  252. </ul>
  253. <div class="cart-skeleton">
  254. <ul></ul>
  255. </div>
  256. <div class="confirmItemCart">
  257. <span id="successAdd">
  258. </span>
  259. </div>
  260.  
  261.  
  262. <head>
  263. <link href="/Content/bootstrap.min.css" rel="stylesheet" />
  264. </head>
  265. <h2>Register.</h2>
  266.  
  267. <form action="/Account/Register" class="form-horizontal" method="post" role="form"><input name="__RequestVerificationToken" type="hidden" value="v-TIoGZc6-uiriXgcE8LdYbIMVzhS8jz958inhO79PG5LPHYBZts90rmCXzMtubHwj7fnjxfI5q_feAbprCOy_uSX7qtk9ZxYhNVVH_n-j41" /> <div class="col-md-10 col-md-offset-2">
  268. <div class="card card-body bg-light">
  269. <table class="table table-bordered">
  270. <thead>
  271. <tr class="table-success">
  272. <td colspan="2">
  273. New User Registeration
  274. </td>
  275. </tr>
  276. </thead>
  277. <div class="validation-summary-valid text-danger" data-valmsg-summary="true"><ul><li style="display:none"></li>
  278. </ul></div>
  279. <tbody>
  280. <tr>
  281. <td>
  282. <label for="Email">Email</label>
  283. </td>
  284. <td>
  285. <input data-val="true" data-val-email="The Email field is not a valid e-mail address." data-val-required="The Email field is required." id="txtEmail" name="Email" placeholder="Email" type="text" value="" />
  286. </td>
  287. </tr>
  288. <tr>
  289. <td>
  290. <label for="Password">Password</label>
  291. </td>
  292. <td>
  293. <input data-val="true" data-val-length="The Password must be at least 6 characters long." data-val-length-max="100" data-val-length-min="6" data-val-required="The Password field is required." id="txtPassword" name="Password" placeholder="Password" type="text" value="" />
  294. </td>
  295. </tr>
  296. <tr>
  297. <td>
  298. <label for="ConfirmPassword">Confirm password</label>
  299. </td>
  300. <td>
  301. <input data-val="true" data-val-equalto="The password and confirmation password do not match." data-val-equalto-other="*.Password" id="txtConfirmPassword" name="ConfirmPassword" placeholder="Confirm Password" type="text" value="" />
  302. </td>
  303. </tr>
  304. <tr class="table-success">
  305. <td colspan="2">
  306. <input id="btnRegister" class="btn btn-success" type="button" value="Register" />
  307. </td>
  308. </tr>
  309. </tbody>
  310. </table>
  311. <div class="modal fade" tabindex="-1" id="successModal" data-keyboard="false" data-backdrop="static">
  312. <div class="modal-dialog modal-sm">
  313. <div class="modal-content">
  314. <div class="modal-header">
  315. <button type="button" class="close" data-dismiss="modal">
  316. &times;
  317. </button>
  318. <h4>Success</h4>
  319. </div>
  320. <div class="modal-body">
  321. <h2>Registration Successful!</h2>
  322. </div>
  323. <div class="modal-footer">
  324. <button type="button" data-dismiss="modal" class="btn btn-success">
  325. Close
  326. </button>
  327. </div>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. </form><script src="/Scripts/bootstrap.min.js"></script>
  334. <script type="text/javascript">
  335. //if (!window.jQuery) {
  336. // alert("no jQuery");
  337. //}
  338. //else {
  339. // alert("jQuery");
  340. //}
  341.  
  342. $(document).ready(function () {
  343. $('#btnRegister').click(function () {
  344. $('#successModal').modal('show');
  345. })
  346. });
  347. </script>
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354. </div>
  355. <div id="col3">
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. </main>
  361. <footer>
  362. <p>&copy; 2019 - BabagmallLocal.Co</p>
  363. </footer>
  364. </body>
  365. <script type="text/javascript">
  366. function autocompl() {
  367. $.post("/Home/ItemList",
  368. function (data) {
  369. //successful requests get here
  370. if (!(JSON.stringify(Response.data) == '{}')) {
  371. autocomplete(document.getElementById("inpSearch"), data)
  372. $("#inpSearch").css("border-radius", "1em 1em 0 0")
  373. }
  374. }
  375. )
  376. }
  377. </script>
  378.  
  379. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement