static
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
<!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">
|
||||
var LearnSQLExport_Sch=0;
|
||||
var FileName="";
|
||||
|
||||
function SketchLeftLearnSQLExportMainPostMessage(str){
|
||||
parent.window.postMessage(
|
||||
str,
|
||||
"*" //or "www.parentpage.com"
|
||||
);
|
||||
}
|
||||
|
||||
function LearnSQLExport_Main_Init(){
|
||||
LearnSQLExport_Sch=0;
|
||||
FileName="";
|
||||
}
|
||||
|
||||
function client_request_left_learnsqlexport_main(str){
|
||||
window.parent.parent.postMessage(
|
||||
{
|
||||
event_id: 'client_request_left_learnsqlexport_main',
|
||||
data: {
|
||||
v1: str
|
||||
}
|
||||
},
|
||||
"*" //or "www.parentpage.com"
|
||||
);
|
||||
}
|
||||
|
||||
function receiveMessage(event) {
|
||||
console.log(event);
|
||||
if (event.data.event_id == "client_response_left_learnsqlexport_main") {
|
||||
document.getElementById('LeftLearnSQLExportIframe').contentWindow.postMessage(
|
||||
event.data
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
var frame = event.data.split('#');
|
||||
var head = frame[0].split(':');
|
||||
|
||||
switch (head[0]) {
|
||||
case 'LearnSQLExportSch0': {
|
||||
// var data = head[1].split(',');
|
||||
FileName = head[1];
|
||||
//console.log("here:"+FileName);
|
||||
|
||||
LearnSQLExport_Sch = 1;
|
||||
window.open('HMI_Sketch_Left_LearnSQLExport_Sch1.html', 'LeftLearnSQLExportIframe');
|
||||
}
|
||||
break;
|
||||
case 'LearnSQLExportSch1':{
|
||||
var data=head[1];
|
||||
if(data=="OK"){
|
||||
var str="LearnSQLExport:"+FileName+"#";
|
||||
client_request_left_learnsqlexport_main(str);
|
||||
}
|
||||
LearnSQLExport_Main_Init();
|
||||
SketchLeftLearnSQLExportMainPostMessage("Main");
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
window.addEventListener("message", receiveMessage, false);
|
||||
|
||||
</script>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
HMI_Sketch_Left_LearnSQLExport_Main
|
||||
<div>
|
||||
<iframe id="LeftLearnSQLExportIframe" name="LeftLearnSQLExportIframe" width=100% height=560 src="HMI_Sketch_Left_LearnSQLExport_Sch0.html" frameborder="2" scrolling="auto"></iframe>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user