Site logo

Archived topic

Problem with the HOOK

7 replies · Started by Robert on October 30, 2020

Viewing posts 1–8 of 8

Hi

I addd this code into the hook element - HAED:

<style>
#iframeForSmartWeb {
position: fixed;
bottom: 0;
right: 0;
}
</style>
<script>
window.addEventListener('message', function (event) {
if(window.document.getElementById("iframeForSmartWeb").style.height !== '60px'){
window.document.getElementById("iframeForSmartWeb").setAttribute("style","width: 300px !important; height: 60px !important");
}
else{
if(window.outerWidth < 770){
window.document.getElementById("iframeForSmartWeb").setAttribute("style","width: 100% !important; height: 100% !important");}
else{
window.document.getElementById("iframeForSmartWeb").setAttribute("style","width: 770px !important; height:460px !important");}}
}, false);

</script>

<!-- PRZYKŁĄDOWE OSADZENIE -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<script type="text/javascript">
var containerIdForSmartWeb = "elementForSmartWeb";
jQuery.noConflict();
jQuery(document).ready(function () {
jQuery.cachedStScript = function (url, options) {
options = jQuery.extend(options || {}, {dataType: "script", cache: true, url: url});
return jQuery.ajax(options);
};
jQuery.cachedStScript("https://avatar.e-szpital.eu/player-kafelkowy/pk-home/kedzierzyn_kozle/js/wdscript-pk-2.2.js").done(function (script, textStatus) {
jQuery('#' + containerIdForSmartWeb).smartWeb({
locationForSmartWeb: "https://avatar.e-szpital.eu/player-kafelkowy/mvc/kedzierzyn_kozle",
isMovable: false,
float: "right",
wdHeaderForMoving: 500,
width: "300",
height: "60",
loader: ''

}).open();
});
});
</script>

and this into HOOK - BODY:

The chat winow is online works OK
but the whole page is down...

Did I something wrong ?

Kr
Robert

Hi there,

Scripts are usually added in wp_footer. Can you give that a shot first?

Where did you get the code from?

Did the source provide any instructions on how to add it?

in the FOOTER now it looks to work!

thx
R

No problem :)

Hi

unfortunately it works not all corect:

the blue chat Avatar on the right works but the whole page runs away...

Kr
Robert

... I meeen: if I scroll the whole page down - under the footer is +/- 10cm white space...

on this 2 websites it works perfect (Im not the webdesigner from them...)

I'm not sure if I understand.

Are you saying that your custom script isn't working?

Unfortunately that's not a script coming from us so we cannot help with it.

You will need to check with the author of the script.

This archived topic is closed to new replies.