-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.js
41 lines (32 loc) · 975 Bytes
/
form.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function open_page(){
let a = document.createElement('a');
//a.target= '_blank';
a.href = './main.html';
a.click();
};
function validate() {
if(document.loginform.name.value==''){
alert('Fill the Input name');
name.focus();
return false;
}
if(document.loginform.email.value==''){
alert('Fill the Input email');
email.focus();
return false;
}
}
function go(){
// (A) VARIABLES TO PASS
var lname = document.getElementById("lname").value
var lmail = document.getElementById("lmail").value
// (B) OPEN NEW WINDOW
// Just pass variables over to new window
sessionStorage.setItem("lname", lname);
sessionStorage.setItem("lmail", lmail);
// prompt("inside if" + name + " " + mail);
//window.open("./ssc.html");//window.location.href = "./ssc.html";
//prompt("inside if" + name + " " + mail);
// prompt(lname, lmail);.
};
go();