-
Notifications
You must be signed in to change notification settings - Fork 0
/
ticket_page.js
23 lines (19 loc) · 883 Bytes
/
ticket_page.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var form = document.querySelector('form')
var Customer_ticket = function(customer_email,customer_category,customer_request){
this.customer_email = customer_email
this.customer_category = customer_category
this.customer_request = customer_request
}
function after_submit(){
event.preventDefault()
var customer_email = document.getElementById('customer_email')
var customer_category = document.getElementById('customer_category')
var customer_request = document.getElementById('customer_request')
var customer_details = new Customer_ticket (customer_email.value,customer_category.value,customer_request.value)
localStorage.setItem('customer_details',JSON.stringify(customer_details))
window.location.href = "customer_success.html"
}
function start (){
form.addEventListener('submit',after_submit)
}
window.addEventListener('load',start)