View Full Version : help a newbie please
dirtwalker
07-16-2002, 01:08 AM
Hi...i have two snippets of code on a page that are conflicting with eachother.
One is a popup, and the other is a counter....I know this is easy, but im racking my head, cuz i figure out how to fix it....
Any help would be greatly appreciatied!!
Spookster
07-16-2002, 01:48 AM
You would need to post the code for the two or at least post the url to the page in question.
dirtwalker
07-16-2002, 05:16 AM
Cool! Thanks for looking at this!!! Here are the 2 sets of code that I have placed in the body tag:
FIRST SCRIPT:
-----------------------------------------------------------------------------------
<script>
//Popup Window Script
//By JavaScript Kit (http://javascriptkit.com)
//JavaScript tutorials and over 400+ free scripts
function openpopup(){
var popurl="instant.html"
winpops=window.open(popurl,"","width=330,height=250,")
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('poppedup')==''){
openpopup()
document.cookie="poppedup=yes"
}
}
loadornot()
</script>
-----------------------------------------------------------------------------------
AND HERE IS THE 2ND SCRIPT:
-----------------------------------------------------------------------------------
<!-- Start of allfreestats Web Stats Code. Do not alter this code!-->
<SCRIPT language="javascript"><!--
var sw="";
var sh="";
var c="";
var j="u";
var r=""+escape(top.document.referrer);
var p="";
var js="1.0";
var acc="mc[mtyheiieestv[ntcsses]o";
var tag = "<A HREF=\"http://www.allfreestats.com/cgi-bin/stats-bin/do/link.cgi?id=mc[mtyheiieestv[ntcsses]o\">"+
"<IMG SRC=\"http://www.allfreestats.com/cgi-bin/stats-bin/do/stats.cgi?j=u&r="+r+
"&js="+js+"&id=mc[mtyheiieestv[ntcsses]o\""+" BORDER=0></A>";
//--></SCRIPT>
<SCRIPT language="javascript1.1"><!--
js="1.1";
//--></SCRIPT>
<SCRIPT language="javascript1.2"><!--
sw=screen.width;
sh=screen.height;
js="1.2";
var v=navigator.appName;
if (v != "Netscape") {
c=screen.colorDepth;
} else {
c=screen.pixelDepth;
};
j=navigator.javaEnabled();
if (v == "Netscape") {
for (i = 0; i < navigator.plugins.length; ++i) p += navigator.plugins[i].name + ';';
p = escape(p);
}
if (v == "Opera") {
for (i = 0; i < navigator.plugins.length; ++i) p += navigator.plugins[i].name + ';';
p = escape(p);
}
//--></SCRIPT>
<SCRIPT language="javascript1.3"><!--
js="1.3";
//--></SCRIPT>
<SCRIPT language="javascript1.4"><!--
js="1.4%2B";
//--></SCRIPT>
<SCRIPT SRC="http://www.allfreestats.com/cgi-bin/stats-bin/do/get_code.cgi"><!--
//--></SCRIPT>
<script language="javascript"><!--
document.write(tag); //-->
</script>
<NOSCRIPT>
<A HREF="http://www.allfreestats.com/cgi-bin/stats-bin/do/link.cgi?id=mc[mtyheiieestv[ntcsses]o"><IMG
SRC="http://www.allfreestats.com/cgi-bin/stats-bin/do/stats.cgi?j=u&r=u&id=mc[mtyheiieestv[ntcsses]o"
BORDER=0></A>
</NOSCRIPT>
-----------------------------------------------------------------------------
Spookster
07-16-2002, 06:23 AM
Glancing through both scripts I do not see anything that could be conflicting with each other. What error are you getting exactly? Might be better to post a URL to the page where you have these two scripts in. It would be easier to debug that way.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.