Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi all,
I'm trying to embed Mashup in HTML iframe, but it throwing error while loading. I went through this PTC article still it throwing error - CS318142
PFA the Web.xml file configuration
HTML Code
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container">
<iframe class="responsive-iframe" src="http://inchetwxdev2/Thingworx/Mashups/TestMashup?appKey=ec1b7ca4-611a-4f1c-97c3-efcdad3fba00&x-thingworx-session=true"></iframe>
</div>
</body>
</html>
Could anyone help me to solve this issue.
Thanks in advance
/VR
Hello,
Try below code.
Regards
Shyam
============================================
<table>
<tr>
<td>
<input type="text" id="inputText" placeholder="Type anything to search..."/><br />
<input type="button" name="radiobutton" value="Search" onClick="changeDivContent()">
</td>
<td>
<div id="div1" style="width:1000px;height:500px;border:1px solid #ddd;"></div>
</td>
</tr>
</table>
<script>
function changeDivContent() {
var input = document.getElementById('inputText').value;
var url = "http://localhost/Thingworx/Runtime/index.html#mashup=MashupName&appKey=2c175b20-43ds-40f0-bb7c-1234323&x-thingworx-session=true&inputProductIds=xyz%3Babc";
var div = document.getElementById('div1');
div.innerHTML = '<iframe style="width:100%;height:100%;" Content-Security-Policy: frame-ancestors "self" frameborder="0" src="' + url + '" />';
var iframe = document.getElementById('iframe');
var htmlStr = url;
iframe.src=htmlStr;
};
function previewUrl(url, target) {
}
</script>
It is something to do with your browser and network. I too faced this issue. It was not working on my system but luckly worked on client's machine.
Hi @Velkumar.
If one of the previous responses allowed you to resolve your problem, please mark the appropriate one as the Accepted Solution for the benefit of others with the same issue.
Thank you for your participation in our community!
Regards.
--Sharon