-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInternSample.html
More file actions
81 lines (59 loc) · 2.53 KB
/
InternSample.html
File metadata and controls
81 lines (59 loc) · 2.53 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en" xmlns="">
<head>
<meta charset="UTF-8">
<title>Internship Sample</title>
<script type = "text/javascript" src = "sample.jsonp">
</script>
<script>
function myfunction(listid){
console.log(listid);
var selected = document.getElementById("listID"+listid).value;
console.log("selected is "+selected+"listId is"+listid);
// listid = listid + 1;
firstDropDown(selected,listid);
console.log("selected is "+selected+"listId is"+listid);
}
function deleteNodes(listid) {
console.log("inside delete nodes");
var deleteID = 4;
var deleteChoice = jsonstr["userChoice"];
// var curselectedindex = document.getElementById(currentID).selectedIndex;
// var curselectedObject = document.getElementById(currentID).options[curselectedindex];
// console.log("curently selected : "+ curselectedObject.text);
// deleteChoice.pop(objtext);
while (deleteID > listid) {
var present = document.getElementById("listID" + (deleteID));
console.log("present inside while loop 1 is:"+present);
if (present != 'listID0' && present != null) {
console.log("inside already present");
// deleteChoice.pop(present);
present.parentNode.removeChild(present);
console.log("deleted choice" + deleteChoice);
}
deleteID = deleteID - 1;
}
deleteID = 4;
while (deleteID > listid) {
var newpresent = document.getElementById("listID" + (deleteID));
console.log("present inside while loop 2 is:"+newpresent);
if (present != 'listID0' && present != null) {
deleteChoice.pop(newpresent);
console.log("deleted and popped choice" + deleteChoice);
}
deleteID = deleteID - 1;
}
}
function selectfunc(){
document.getElementById("listID0").value = "select";
}
</script>
</head>
<body style="background-color: lemonchiffon;">
<span style = "color: darkslategray;font-family: Chalkboard" >Internship</span>
<div id = "div1">
<button type = button id = "reset" onclick = "deleteNodes(0);selectfunc();">RESET</button>
</div>
</body>
<script type = "text/javascript" src = "SampleInternJs.js"></script>
</html>