03-12-2020, 12:05 PM
Hello,
I'm running into an issue about using IntraWeb on a website.
I've made a IntraWeb project that works fine as a standalone application. However, I need the html result of this project, to be load into another webpage that doesn't use IntraWeb.
What I'm using is ajax. By clicking on a button, an ajax request is send and asks the standalone application to return the html content, and add it to a specific div of the non-IntraWeb page. After the ajax request, I get all my code in the result variable, and that is fine. But somehow, I don't know why, the inclusion of the javascript files of the IntraWeb project, is trying to be loaded from the IP of the non-IntraWeb project rather than the standalone application.
More specifically :
1. I'm on http://192.168.1.149/accueil
2. I clicked on a button which executes the code below
3. I get the IntraWeb code as the console.log(response) send me this :
4. But it also displays multiple errors like that :
The issue here, is that it's trying to get JS files from 192.168.1.149, but JS files are stored on 192.168.1.134, since that's the url I put on the ajax request
I'm pretty new about IntraWeb, maybe I miss understood something, let me know !
Thank you for you time and your answers
I'm running into an issue about using IntraWeb on a website.
I've made a IntraWeb project that works fine as a standalone application. However, I need the html result of this project, to be load into another webpage that doesn't use IntraWeb.
What I'm using is ajax. By clicking on a button, an ajax request is send and asks the standalone application to return the html content, and add it to a specific div of the non-IntraWeb page. After the ajax request, I get all my code in the result variable, and that is fine. But somehow, I don't know why, the inclusion of the javascript files of the IntraWeb project, is trying to be loaded from the IP of the non-IntraWeb project rather than the standalone application.
More specifically :
1. I'm on http://192.168.1.149/accueil
2. I clicked on a button which executes the code below
Code:
$('#load_iw_button').click(function () {
console.log('clic sur IntraWeb');
var une_url = "http://192.168.1.134:8888";
$.ajax({
type: 'POST',
url: une_url,
xhrFields: {
withCredentials: true
},
success: function (response) {
//console.log('action_delete() reponse: ' + response);
console.log(response);
if (response !== '') {
console.log("ajout dans la div");
$("#div_iw").append(response);
}
}
})
.done(function (data) {
//console.log('done');
})
.fail(function (request, error) {
console.log('action_delete(): fail');
console.log(request);
console.log(error);
});
3. I get the IntraWeb code as the console.log(response) send me this :
Code:
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="generator" content="IntraWeb v15.1.15 Serial 202037997">
<link href="/$/css/IWNotify__2753029400.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" nonce="zjrQMCyHs4VMZVlOn8g76KA5aQ8">
var GURLBase="/$/", GAppID="nSkvmshq0xMbxMTaN6nhYvgAzZq", GTrackID=1;
function doOnReady(f){
var d = document;
if (d.readyState!="loading") f();
else if (d.addEventListener) d.addEventListener("DOMContentLoaded", f);
else d.attachEvent("onreadystatechange", function(){if (d.readyState=="complete") f();})
}
</script>
<script type="text/javascript" src="/$/js/IWLib__2067137548.js"></script>
<script type="text/javascript" src="/$/js/IWBase__2847485697.js"></script>
<script type="text/javascript" src="/$/js/IWGecko__1086946337.js"></script>
<script type="text/javascript" nonce="zjrQMCyHs4VMZVlOn8g76KA5aQ8">
function rollon_GRD1(row, where){
var rowElement = IW.$(row);
if (rowElement && rowElement.style){
if (where == "over"){
currentcolor = rowElement.style.backgroundColor;
rowElement.style.backgroundColor = "";
} else {
rowElement.style.backgroundColor = currentcolor;
}
}
}
function CHECKBOXTOUS_onchange(event) {
checkBoxAllChange();
return true;
}
function Body_OnBlur(){GSubmitting = false;}
function FormDefaultSubmit(event){return false;}
function IWTop(){return window;}
function checkBoxAllChange(){
if ($('#CHECKBOXTOUS_CHECKBOX').prop('checked')){
$('#TBLGRD1 tr').each(function(){
$(this).find('td:first span input').prop('checked', true);
});
} else {
$('#TBLGRD1 tr').each(function(){
$(this).find('td:first span input').prop('checked', false); });
}}
// and so on ...
4. But it also displays multiple errors like that :
Code:
VM3897 jquery-3.3.1.min.js:2 GET http://192.168.1.149/buroclic_online/js/bootstrap_table/tableExport.jquery.plugin-master/libs/jsPDF/jspdf.min.js 404 (Not Found)
The issue here, is that it's trying to get JS files from 192.168.1.149, but JS files are stored on 192.168.1.134, since that's the url I put on the ajax request
I'm pretty new about IntraWeb, maybe I miss understood something, let me know !
Thank you for you time and your answers