Files
apt-nl-map/static/Magic4/Mapping/HMI_Mapping_Left_BoschMapDelete_Sch2.html

46 lines
1.5 KiB
HTML
Raw Normal View History

2024-12-04 10:21:04 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="../jquery-2.1.0.min.js"></script>
<script src="../jquery.cookie.js"></script>
<script type="text/javascript" type="text/javascript">
function receiveMessage(event) {
console.log('BoschMapDelete_Sch2:');
console.log(event);
switch (event.data.event_id) {
case "client_response_left_boschmapdelete_main": {//case "client_response":{
var data = event.data.data;
var result = data.v1;
var ROS_String_Output = data.v2;
var Rec_HMI_String_Input = data.v3;
document.getElementById('result').innerText = 'result=' + result;
document.getElementById('ROS_String_Output').innerText = 'ROS_String_Output=' + ROS_String_Output;
document.getElementById('Rec_HMI_String_Input').innerText = 'Rec_HMI_String_Input=' + Rec_HMI_String_Input;
Lu_Parse_mapMapName(ROS_String_Output);
}break;
}
}
function Lu_Parse_mapMapName(str){
var frame1=str.split('StrReq=');
console.log("frame1:"+frame1[1]);
var frame2=frame1[1].split('\n');
var info=JSON.parse(frame2[0]);
console.log(info.params.query.clientMapName);
parent.MapName=info.params.query.clientMapName;
}
window.addEventListener("message", receiveMessage, false);
</script>
<title>Title</title>
</head>
<body>
HMI_Mapping_Left_BoschMapDelete_Sch2
<tr>
<div id='result'></div>
<div id='ROS_String_Output'></div>
<div id='Rec_HMI_String_Input'></div>
</tr>
</body>
</html>