How to set the result variable of a javascript of one div to another div tag
Java
3
Posts
2
Posters
0
Views
1
Watching
-
HTML PAGE:
<label for="cust\_name">Name</label> <input id="cust\_name" type="text"/> <label for="cust\_id">Customer-ID</label> <input id="cust\_id" type="text" /> <label for="cust\_phone">Phone Number</label> <input id="cust\_phone" type="number" /> <label for="cust\_add">Address</label> <input id="cust\_add" type="text" /> <label for="cust\_issue">Issue</label> <input id="cust\_issue" type="text" /> <label for="complaint\_date">Date of Complaint</label> <input id="complaint\_date" type="text" /> [<input type="button" value="Show History" data-icon="back" data-iconpos="right" id="History" onClick()="getHistory()"/>](#historypage) [<input type="button" value="Start Assessment" data-icon="check" data-iconpos="right" id="Assessment"/>](#assessmentpage)
</form>
<form id="historyForm"> <label for="hist\_cname">Customer Name</label> input id="hist\_cname" type="text" /> <label for="hist\_cid">CustomerID</label> <input id="hist\_cid" type="text" /> </form>
Here are the details
'
SCRIPT:
function getHistory() {
var cust\_id = document.getElementById("cust\_id"); var myTable = ''; myTable += ''; myTable += ""; var url = "http://localhost:8080/POS/rest/WebServices/getHistory/"+cust\_id.value;
$.getJSON(url, function(json) {
$.each(json, function(i, v) { myTable += "
S.No.
Date
Time
Complaint(s)
" + v.date + "
"+ v.time + "
" + v.issue
+ "" ;
});});
what i have to do here is,when i clicked the bu
-
HTML PAGE:
<label for="cust\_name">Name</label> <input id="cust\_name" type="text"/> <label for="cust\_id">Customer-ID</label> <input id="cust\_id" type="text" /> <label for="cust\_phone">Phone Number</label> <input id="cust\_phone" type="number" /> <label for="cust\_add">Address</label> <input id="cust\_add" type="text" /> <label for="cust\_issue">Issue</label> <input id="cust\_issue" type="text" /> <label for="complaint\_date">Date of Complaint</label> <input id="complaint\_date" type="text" /> [<input type="button" value="Show History" data-icon="back" data-iconpos="right" id="History" onClick()="getHistory()"/>](#historypage) [<input type="button" value="Start Assessment" data-icon="check" data-iconpos="right" id="Assessment"/>](#assessmentpage)
</form>
<form id="historyForm"> <label for="hist\_cname">Customer Name</label> input id="hist\_cname" type="text" /> <label for="hist\_cid">CustomerID</label> <input id="hist\_cid" type="text" /> </form>
Here are the details
'
SCRIPT:
function getHistory() {
var cust\_id = document.getElementById("cust\_id"); var myTable = ''; myTable += ''; myTable += ""; var url = "http://localhost:8080/POS/rest/WebServices/getHistory/"+cust\_id.value;
$.getJSON(url, function(json) {
$.each(json, function(i, v) { myTable += "
S.No.
Date
Time
Complaint(s)
" + v.date + "
"+ v.time + "
" + v.issue
+ "" ;
});});
what i have to do here is,when i clicked the bu
-
This forum is for Java issues; the Javascript forum is http://www.codeproject.com/Forums/1580226/JavaScript.aspx[^].
Oh sorry