JS Code Blocking Chatbox
+2
Pizza Boi
J0k3R^
6 posters
Page 1 of 1
JS Code Blocking Chatbox
Hi
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
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
- 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 );
});
}
});
Re: JS Code Blocking Chatbox
J0k3R^ wrote:Hi
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
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
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: JS Code Blocking Chatbox
is it possible to be related with my tabs on footer?
because my JS's code is named "FooterTabs2" and i have one more called "FooterTabs1" ↓ (the following)
but when i disable the "FooterTabs2" (Placement: nothing) my forum's tabs are still working fine, atleast they seem so..
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
Re: JS Code Blocking Chatbox
Hi
No, it's not related, just search for something that involves span="variable".
Regards,
Pizza Boi
No, it's not related, just search for something that involves span="variable".
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: JS Code Blocking Chatbox
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?
- Maybe i had removed the codes that were related with this js, is it possible right?
Re: JS Code Blocking Chatbox
Easiest way to test is: Remove the JS and test if everything works Save the JS in a document, in case you suddenly realize a malfunction on your website.
Re: JS Code Blocking Chatbox
DangerZone wrote:Easiest way to test is: Remove the JS and test if everything works 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
Re: JS Code Blocking Chatbox
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?
Hi
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
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: JS Code Blocking Chatbox
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();
});
});
Re: JS Code Blocking Chatbox
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
Re: JS Code Blocking Chatbox
Το me the chatbox opens fine! The and i can login fine also. What is the problem?
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!
Re: JS Code Blocking Chatbox
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;
}
Re: JS Code Blocking Chatbox
Hi
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...
Regards,
Pizza Boi
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
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: JS Code Blocking Chatbox
omg, its a triple chatbox
just kidding.. thanks for the chatbox @Jack Atlas
But should i remove this code from js? (this at first post)
thanks, im just using a simple, small and convenient button for popup chat
just kidding.. thanks for the chatbox @Jack Atlas
But should i remove this code from js? (this at first post)
Pizza Boi wrote:Hi
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
Re: JS Code Blocking Chatbox
Hi
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
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
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: JS Code Blocking Chatbox
Pizza Boi wrote:Hi
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*
Re: JS Code Blocking Chatbox
Hi
The pizza's here! That'd be $2.99 .
No problem~
Regards,
Pizza Boi
The pizza's here! That'd be $2.99 .
No problem~
Regards,
Pizza Boi
Pizza Boi- Hyperactive
- Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!
Re: JS Code Blocking Chatbox
Jack Atlas wrote:heyo don't remove the javascript
i dont remove yours, it was question about the first post javascript
Re: JS Code Blocking Chatbox
Topic Solved & Archived
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Code For Chatbox
» HTML code for chatbox
» [Code]Involving Chatbox
» Chatbox backbround pic (CSS code)
» CSS code(s) for getting rid off chatbox buttons
» HTML code for chatbox
» [Code]Involving Chatbox
» Chatbox backbround pic (CSS code)
» CSS code(s) for getting rid off chatbox buttons
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum