JS Code Blocking Chatbox Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
+2
Pizza Boi
J0k3R^
6 posters

    JS Code Blocking Chatbox

    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved JS Code Blocking Chatbox

    Post by J0k3R^ April 23rd 2014, 5:31 pm

    Hi  Hello 
    i realized that a code on my js is blocking my chatbox popup.
    i dont know js language, can somebody tell me what is this and if its necessary (maybe for other codes) ?
    thanks  :rose: 


    Code:
    $(function() {
          var x = document.getElementById('variables').getElementsByTagName('span');
          for (var i = 0, v; (v = x[i++]); ) {
                $('.' + v.id).html(v.innerHTML);
                $('.' + v.id + '-replace').each(function(i, e) {
                    e.innerHTML = e.innerHTML.replace( RegExp('{' + v.id + '}', 'g') , v.innerHTML );
                });
          }
        });
    Pizza Boi
    Pizza Boi
    Hyperactive


    Male Posts : 2016
    Reputation : 160
    Language : French
    Location : Pizza Hut!

    Solved Re: JS Code Blocking Chatbox

    Post by Pizza Boi April 23rd 2014, 5:35 pm

    J0k3R^ wrote:Hi  Hello 
    i realized that a code on my js is blocking my chatbox popup.
    i dont know js language, can somebody tell me what is this and if its necessary (maybe for other codes)?


    Code:
    $(function() {
          var x = document.getElementById('variables').getElementsByTagName('span');
          for (var i = 0, v; (v = x[i++]); ) {
                $('.' + v.id).html(v.innerHTML);
                $('.' + v.id + '-replace').each(function(i, e) {
                    e.innerHTML = e.innerHTML.replace( RegExp('{' + v.id + '}', 'g') , v.innerHTML );
                });
          }
        });

    Hi Very Happy

    Judging from this line alone: var x = document.getElementById('variables').getElementsByTagName('span'); you can safely say that it involves anything that has span="variables". See the word Tag and ID? That technically makes up the one I just said.

    The code just says that anything in the span="variables" will get replaced by a specific, I'm just not sure what it'll be replaced with since I'm sure that this isn't the full code right now.

    Regards,
    Pizza Boi
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: JS Code Blocking Chatbox

    Post by J0k3R^ April 23rd 2014, 5:40 pm

    is it possible to be related with my tabs on footer?

    JS Code Blocking Chatbox SpDcNQE

    because my JS's code is named "FooterTabs2" and i have one more called "FooterTabs1" ↓ (the following)

    Code:
    Codes Removed

    but when i disable the "FooterTabs2" (Placement: nothing) my forum's tabs are still working fine, atleast they seem so..


    Last edited by J0k3R^ on April 23rd 2014, 5:51 pm; edited 1 time in total
    Pizza Boi
    Pizza Boi
    Hyperactive


    Male Posts : 2016
    Reputation : 160
    Language : French
    Location : Pizza Hut!

    Solved Re: JS Code Blocking Chatbox

    Post by Pizza Boi April 23rd 2014, 5:47 pm

    Hi Very Happy

    No, it's not related, just search for something that involves span="variable".

    Regards,
    Pizza Boi
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: JS Code Blocking Chatbox

    Post by J0k3R^ April 23rd 2014, 5:50 pm

    yeah, i already tried that and i found nothing at css or templates


    - Maybe i had removed the codes that were related with this js, is it possible right? Smile
    DangerZone
    DangerZone
    Forumember


    Female Posts : 27
    Reputation : 5
    Language : .

    Solved Re: JS Code Blocking Chatbox

    Post by DangerZone April 23rd 2014, 5:58 pm

    Easiest way to test is: Remove the JS and test if everything works Wink Save the JS in a document, in case you suddenly realize a malfunction on your website.
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: JS Code Blocking Chatbox

    Post by J0k3R^ April 23rd 2014, 5:59 pm

    DangerZone wrote:Easiest way to test is: Remove the JS and test if everything works Wink Save the JS in a document, in case you suddenly realize a malfunction on your website.

    Good, i will go do that and will come back for feedback
    Pizza Boi
    Pizza Boi
    Hyperactive


    Male Posts : 2016
    Reputation : 160
    Language : French
    Location : Pizza Hut!

    Solved Re: JS Code Blocking Chatbox

    Post by Pizza Boi April 23rd 2014, 7:24 pm

    J0k3R^ wrote:yeah, i already tried that and i found nothing at css or templates


    - Maybe i had removed the codes that were related with this js, is it possible right? Smile

    Hi Very Happy

    Yeah, that's highly probable and to be honest, I think I saw that code before. I saw a site that had it along with an avatar placed in the upper part of the header.

    Anyway, just do what DZ says.

    Regards,
    Pizza Boi
    Jack Atlas
    Jack Atlas
    Forumember


    Posts : 100
    Reputation : 1
    Language : english

    Solved Re: JS Code Blocking Chatbox

    Post by Jack Atlas April 23rd 2014, 7:36 pm

    why to not make a pop up javascript chatbox
    Code:
    jQuery(document).ready(function(){
    jQuery('body').append('<span id="chatButton" title="Open/Close Chatbox">Open Chat</span><div id="chatBox"><iframe src="/chatbox/index.forum"></iframe></div>');
    jQuery('#chatBox').hide();
    jQuery('#chatButton').css('position', 'fixed').css('right', '0px').css('bottom', '0px');
    jQuery('#chatBox iframe').css('position', 'fixed').css('right', '10px').css('bottom', '45px');
    if(!document.getElementById('logout')){
    jQuery('#chatButton').hide();
    jQuery('#chatBox').hide();}
    jQuery('#chatButton').click(function(){
    jQuery('#chatBox').fadeToggle();
    });
    });
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: JS Code Blocking Chatbox

    Post by J0k3R^ April 23rd 2014, 7:41 pm

    Jack Atlas wrote:why to not make a pop up javascript chatbox
    Code:
    jQuery(document).ready(function(){
    jQuery('body').append('<span id="chatButton" title="Open/Close Chatbox">Open Chat</span><div id="chatBox"><iframe src="/chatbox/index.forum"></iframe></div>');
    jQuery('#chatBox').hide();
    jQuery('#chatButton').css('position', 'fixed').css('right', '0px').css('bottom', '0px');
    jQuery('#chatBox iframe').css('position', 'fixed').css('right', '10px').css('bottom', '45px');
    if(!document.getElementById('logout')){
    jQuery('#chatButton').hide();
    jQuery('#chatBox').hide();}
    jQuery('#chatButton').click(function(){
    jQuery('#chatBox').fadeToggle();
    });
    });

    u skipped css code because this code is not full  :rose:
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: JS Code Blocking Chatbox

    Post by TheCrow April 23rd 2014, 7:47 pm

    Το me the chatbox opens fine! The and i can login fine also. What is the problem?



    JS Code Blocking Chatbox Thecro10
    Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Jack Atlas
    Jack Atlas
    Forumember


    Posts : 100
    Reputation : 1
    Language : english

    Solved Re: JS Code Blocking Chatbox

    Post by Jack Atlas April 23rd 2014, 7:48 pm

    yea this sorry ^^
    Code:
    /*Chatbox*/
    #chatButton{
    box-shadow:0px 10px 6px rgba(255,255,255, 0.2) inset, 0px -10px 6px rgba(0,0,0, 0.2) inset;
    padding:10px 20px 10px 20px;
    background-color:#000000;
    border:1px solid #146;
    font-weight:bold;
    font-size:10px;
    z-index:999;
    color:#fff;
    }
    #chatButton:hover{
    cursor:pointer;
    color:#ff0000;
    background-color:#000000;
    }
    #chatBox iframe{
    z-index:999;
    border:none;
    height:50%;
    width:65%;
    }
    #chatButton{
    bottom:20px !important;
    }
    #chatBox iframe{
    bottom:60px !important;
    }
    in css
    Pizza Boi
    Pizza Boi
    Hyperactive


    Male Posts : 2016
    Reputation : 160
    Language : French
    Location : Pizza Hut!

    Solved Re: JS Code Blocking Chatbox

    Post by Pizza Boi April 23rd 2014, 7:56 pm

    Hi Very Happy

    Hey, man, this is the one I use for my site, just add it anywhere (Preferably on top of your overall_header template) in anything that accepts HTML. Make sure to change the picture though...

    Code:
    <div style="overflow: visible; position: fixed; bottom: 30px; height: 350px; right: 0px; z-index:10000; "><iframe src="/chatbox/index.forum" id="chatboxpop" scrolling="yes" style="overflow: visible; width: 750px; height: 350px; display: none; float:right;box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-webkitbox-shadow: 0px 0px 3px rgba(0,0,0,0.25);-o-box-shadow: 0px 0px 3px rgba(0,0,0,0.25);margin-left: 6px; -moz-border-radius: 6px;border-radius: 6px;-webkit-border-radius: 6px;-o-border-radius: 6px;" marginwidth="0" marginheight="0" frameborder="0"></iframe><div onclick="jQuery('#chatboxpop').animate({width:'toggle'},1200); jQuery('#chatboxopen,#chatboxclose').toggle();" style="cursor :pointer; float:left; box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-webkitbox-shadow: 0px 0px 3px rgba(0,0,0,0.25);-o-box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-moz-border-radius: 6px;border-radius: 6px;-webkit-border-radius: 6px;-o-border-radius: 6px;  padding: 6px 3px 6px 3px; position:relative; top:120px;"><img src="http://i.imgur.com/cfSuv2I.png" id="chatboxopen"><img src="http://i.imgur.com/FmfFT1j.png" id="chatboxclose" style="cursor :pointer; display:none;"></div></div>

    Regards,
    Pizza Boi
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: JS Code Blocking Chatbox

    Post by J0k3R^ April 23rd 2014, 7:59 pm

    omg, its a triple chatbox 
    JS Code Blocking Chatbox VQySIZv


    just kidding.. thanks for the chatbox @Jack Atlas


    JS Code Blocking Chatbox Aufkleber_Trollface



    But should i remove this code from js? (this at first post)

    Pizza Boi wrote:Hi Very Happy

    Hey, man, this is the one I use for my site, just add it anywhere (Preferably on top of your overall_header template) in anything that accepts HTML. Make sure to change the picture though...

    Code:
    <div style="overflow: visible; position: fixed; bottom: 30px; height: 350px; right: 0px; z-index:10000; "><iframe src="/chatbox/index.forum" id="chatboxpop" scrolling="yes" style="overflow: visible; width: 750px; height: 350px; display: none; float:right;box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-webkitbox-shadow: 0px 0px 3px rgba(0,0,0,0.25);-o-box-shadow: 0px 0px 3px rgba(0,0,0,0.25);margin-left: 6px; -moz-border-radius: 6px;border-radius: 6px;-webkit-border-radius: 6px;-o-border-radius: 6px;" marginwidth="0" marginheight="0" frameborder="0"></iframe><div onclick="jQuery('#chatboxpop').animate({width:'toggle'},1200); jQuery('#chatboxopen,#chatboxclose').toggle();" style="cursor :pointer; float:left; box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-webkitbox-shadow: 0px 0px 3px rgba(0,0,0,0.25);-o-box-shadow: 0px 0px 3px rgba(0,0,0,0.25);-moz-border-radius: 6px;border-radius: 6px;-webkit-border-radius: 6px;-o-border-radius: 6px;  padding: 6px 3px 6px 3px; position:relative; top:120px;"><img src="http://i.imgur.com/cfSuv2I.png" id="chatboxopen"><img src="http://i.imgur.com/FmfFT1j.png" id="chatboxclose" style="cursor :pointer; display:none;"></div></div>

    Regards,
    Pizza Boi

    thanks, im just using a simple, small and convenient button for popup chat  :rose:
    Pizza Boi
    Pizza Boi
    Hyperactive


    Male Posts : 2016
    Reputation : 160
    Language : French
    Location : Pizza Hut!

    Solved Re: JS Code Blocking Chatbox

    Post by Pizza Boi April 23rd 2014, 8:02 pm

    Hi Very Happy

    Generally speaking, I'd save it first and then if and only if you see a problem to occur, I'd re-install the script and see if it fixes that problem, for now, just have it backed up but removed from your forum~

    Regards,
    Pizza Boi
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: JS Code Blocking Chatbox

    Post by J0k3R^ April 23rd 2014, 8:03 pm

    Pizza Boi wrote:Hi Very Happy

    Generally speaking, I'd save it first and then if and only if you see a problem to occur, I'd re-install the script and see if it fixes that problem, for now, just have it backed up but removed from your forum~

    Regards,
    Pizza Boi

    got it, thanks for codes and help guys.

    mark as *Solved*
    Pizza Boi
    Pizza Boi
    Hyperactive


    Male Posts : 2016
    Reputation : 160
    Language : French
    Location : Pizza Hut!

    Solved Re: JS Code Blocking Chatbox

    Post by Pizza Boi April 23rd 2014, 8:04 pm

    Hi Very Happy

    The pizza's here! That'd be $2.99 Wink .

    No problem~

    Regards,
    Pizza Boi
    Jack Atlas
    Jack Atlas
    Forumember


    Posts : 100
    Reputation : 1
    Language : english

    Solved Re: JS Code Blocking Chatbox

    Post by Jack Atlas April 23rd 2014, 8:07 pm

    heyo don't remove the javascript
    J0k3R^
    J0k3R^
    Forumember


    Male Posts : 742
    Reputation : 28
    Language : Greek > English > Russian > Spanish
    Location : C:\>r00t

    Solved Re: JS Code Blocking Chatbox

    Post by J0k3R^ April 23rd 2014, 8:14 pm

    Jack Atlas wrote:heyo don't remove the javascript

    i dont remove yours, it was question about the first post javascript Smile
    Jack Atlas
    Jack Atlas
    Forumember


    Posts : 100
    Reputation : 1
    Language : english

    Solved Re: JS Code Blocking Chatbox

    Post by Jack Atlas April 23rd 2014, 8:29 pm

    yea ok Razz
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51497
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: JS Code Blocking Chatbox

    Post by SLGray April 24th 2014, 1:37 am

    Topic Solved & Archived



    JS Code Blocking Chatbox Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.