Click to See Complete Forum and Search --> : Possible code interference?


ElvisFan
06-10-2006, 06:16 PM
I'm attempting to install a sliding quote bar on an ezBoard, the code is from JavaSource. It works on a "test board" (a considerably smaller board with less HTML and Java) but installing it on the larger board, it refuses to work.

What information will you need (ie: the original code, the board URL, etc....) if I am able to gain any assistance here?

Here is the original code with our quotes put in place, it is in the Header box:

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
//slider's width
var swidth=350

//slider's height
var sheight=72

//slider's speed
var sspeed=1

//messages: change to your own; use as many as you'd like; set up Hyperlinks to URLs as you normally do: <a target=... href="... URL ...">..message..</a>
var singletext=new Array()
singletext[0]='<div align="center"><font face=Arial size=3 color="white">Well Phuk...<br>All ya gotta do is throw a bra over his head.<br>He`s done.<br> ~Sassy</div></FONT>'
singletext[1]='<div align="center"><font face=Arial size=3 color="white">Floppy is Turkey Taped to a chair next to me.<br> I` m feeding him grapes on a stick. <br>~ Elvie</font></div>'
singletext[2]='<div align="center"><font face=Arial size=3 color="white">You guys watch my back, <br>I`m going after the coonass. <br>~ RIM</font></div>'
singletext[3]='<div align="center"><font face=Arial size=3 color="white">...running through the thread nekkid to distract you... ~Kritter</font></div>'
singletext[4]='<div align="center"><font face=Arial size=3 color="white">Oh and here are some tampons to shoot at their foreheads.<br> ~ Sassy</font></div>'
singletext[5]='<div align="center"><font face=Arial size=3 color="white">Death by tampon.........<br> that`s not the way I`m going.........<br> not in my obit.<br> ~ Floppy</font></div>'
singletext[6]='<div align="center"><font face=Arial size=3 color="white">You know, i like my women like i like my coffee...<br>ground up and in the freezer...<br>good god did i really just say that? <br>~ Codi Mi</font></div>'
singletext[7]='<div align="center"><font face=Arial size=3 color="white">Look at that silly boy <br> running around with a speculum hanging outta his ass. <br>~ Missie</font></div>'
singletext[8]='<div align="center"><font face=Arial size=3 color="white">Fart floppy,<br> fart like you`ve never farted before!! <br>~ Codi Mi</font></div>'
singletext[9]='<div align="center"><font face=Arial size=3 color="white">...finally crawls out from under Sassy`s bra... <br>Wha happened?<br> ~ Phuk</font></div>'
singletext[10]='<div align="center"><font face=Arial size=3 color="white">Just tell them we all got drunk & had a boobie party!! <br>~Ditzzy</font></div>'
singletext[11]='<div align="center"><font face=Arial size=3 color="white">He actually farted the other night <br>and spun around quick to see where the noise came from. <br> ~Hobby</font></div>'
if (singletext.length>1)
i=1
else
i=0
function start(){
if (document.all){
ieslider1.style.top=sheight
iemarquee(ieslider1)
}
else if (document.layers){document.ns4slider.document.ns4slider1.top=sheight
document.ns4slider.document.ns4slider1.visibility='show'
ns4marquee(document.ns4slider.document.ns4slider1)
}
else if (document.getElementById&&!document.all){
document.getElementById('ns6slider1').style.top=sheight
ns6marquee(document.getElementById('ns6slider1'))
}
}
function iemarquee(whichdiv){
iediv=eval(whichdiv)
if (iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){
iediv.style.pixelTop=0
setTimeout("iemarquee(iediv)",100)
}
if (iediv.style.pixelTop>=sheight*-1){
iediv.style.pixelTop-=sspeed
setTimeout("iemarquee(iediv)",100)
}
else{
iediv.style.pixelTop=sheight
iediv.innerHTML=singletext[i]
if (i==singletext.length-1)
i=0
else
i++
}
}
function ns4marquee(whichlayer){
ns4layer=eval(whichlayer)
if (ns4layer.top>0&&ns4layer.top<=sspeed){
ns4layer.top=0
setTimeout("ns4marquee(ns4layer)",100)
}
if (ns4layer.top>=sheight*-1){
ns4layer.top-=sspeed
setTimeout("ns4marquee(ns4layer)",100)
}
else{
ns4layer.top=sheight
ns4layer.document.write(singletext[i])
ns4layer.document.close()
if (i==singletext.length-1)
i=0
else
i++
}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv)
if (parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){
ns6div.style.top=0
setTimeout("ns6marquee(ns6div)",100)
}
if (parseInt(ns6div.style.top)>=sheight*-1){
ns6div.style.top=parseInt(ns6div.style.top)-sspeed
setTimeout("ns6marquee(ns6div)",100)
}
else{
ns6div.style.top=sheight
ns6div.innerHTML=singletext[i]
if (i==singletext.length-1)
i=0
else
i++
}
}
// End -->
</script>

</HEAD>

<div align="center">
<span style="borderWidth:1; borderColor:red; width:350; height:72; background:navy">
<ilayer id="ns4slider" width="&{swidth};" height="&{sheight};">
<layer id="ns4slider1" height="&{sheight};" onmouseover="sspeed=0;" onmouseout="sspeed=1">
<script language="JavaScript">
if (document.layers)
document.write(singletext[0])
</script>
</layer></ilayer>
<script language="JavaScript">
if (document.all){
document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1 solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=1">')
document.writeln('<div id="ieslider1" style="position:relative;width:'+swidth+';">')
document.write(singletext[0])
document.writeln('</div></div>')
}
if(document.getElementById&&!document.all){
document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1px solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=1">')
document.writeln('<div id="ns6slider1" style="position:relative;width:'+swidth+';">')
document.write(singletext[0])
document.writeln('</div></div>')
}
</script></span>
</div>


<p><center>
<font face="arial, helvetica" size"-2"></font>
</center><p>

<!-- Script Size: 5.31 KB -->

This is in the <body code> box:

BODY onLoad="start()"

Michael2003
06-10-2006, 06:23 PM
Your board URL would be the most helpful out of those, but it would be best if you could figure out what else on your site it is interfering with by gradually copying things over to your test version and seeing when it breaks.

ElvisFan
06-10-2006, 06:45 PM
The Underground Coop (http://p101.ezboard.com/btheundergroundcoop)

I have actually done that already. Thats why I'm so incredibly frustrated. I'm at the point of pasting the entire code box here and PAYING someone to help me in this mess. It seemed like such a simple thing to add, I'm in no way a code genius but I can usually manage to add on little things like this.

BTW, thsnk you SO much for responding so quickly, you've renewed my faith again :)

phpnovice
06-10-2006, 06:49 PM
It is probably the onload which is in conflict. This is the most common cause of conflicts between disparate scripts in the same web page. Search all of your code to find other possible references to the onload event. If you don't know how to proceed from there, post here all references to that event.

ElvisFan
06-10-2006, 06:59 PM
OK, I'm literally looking for any reference to the word onload? As of now, I have copied the codebox, in it's entirety from the "real" board to the test board, the blasted thing works at the test board. gggrrrrrrrr

Squishy0024
06-10-2006, 07:20 PM
Hi

I've looked through all the active codes at UC and can't find any other 'onload' references.

Is there something else I can try?

ElvisFan
06-10-2006, 07:47 PM
OK, I've narrowed it down to this..... it's in the custom footer box. When I copied that from the UC to the test board it stopped scrolling. Here is what in the footer box, I'll post it in 2 parts to avoid overlength:

<script language="Javascript" type="text/javascript">
if(document.location.href.indexOf("showMessage")!=-1){
for(k=0;k<document.links.length;k++){
getUser=document.links[k].parentNode
if((document.links[k].href.indexOf("PublicProfile")!=-1)&&(getUser.tagName.toUpperCase()=="SPAN")&&(typeof (getUser.className!="undefined"))&&(getUser.className=="title")){getUser.parentNode.parentNode.className=document.links[k].innerHTML.replace(/ /ig,"")}}}
</script>

<script type="text/javascript">
var logged = "I'm not really";
var members = "Peeps hiding out";
var members2 = "Peeps hiding out - "; </style> // community profile text



/* dont edit below here */
var td = document.getElementsByTagName("td");
var regmem = new RegExp("registered members","ig");
var regmem2 = new RegExp("total registered members:","ig");
var loggedinas = new RegExp("logged in as","ig");

for (k = 0; k < td.length; k++) {
if ((td[k].getAttribute("align") == "right" && td[k].getAttribute("valign") == "bottom") || (td[k].getAttribute("width") == "60%")) {
if (td[k].innerHTML.match(regmem)) {
td[k].innerHTML = td[k].innerHTML.replace(regmem,members)
}
if (td[k].innerHTML.match(loggedinas)) {
td[k].innerHTML = td[k].innerHTML.replace(loggedinas,logged);
}
}
if (td[k].innerHTML.match(regmem2) && (td[k].getAttribute("valign") == "top" && td[k].getAttribute("width") == "40%")) {
td[k].innerHTML = td[k].innerHTML.replace(regmem2,members2);
}
if (td[k].innerHTML.match(loggedinas) && (td[k].innerHTML.indexOf("showIdentityLink?redirectURL") != -1)) {
td[k].innerHTML = td[k].innerHTML.replace(loggedinas,logged);
}
}
/* end change registered members / logged in as text */
</script>

<script type="text/javascript">
<--
var user = getUsername();
var dl = document.links;
var spans = document.getElementsByTagName("span");
var td = document.getElementsByTagName("td");
if (document.title.match("_userName_")) {
document.title = document.title.replace("_userName_",user);
}
for (d = 0; d < dl.length; d++) {
if (dl[d].innerHTML.match("_userName_")) {
dl[d].innerHTML = dl[d].innerHTML.replace("_userName_",user);
}
}
for (s = 0; s < spans.length; s++) {
if (spans[s].innerHTML.match("_userName_") && spans[s].parentNode.className == "m") {
spans[s].innerHTML = spans[s].innerHTML.replace("_userName_",user);
}
}
for (t = 0; t < td.length; t++) {
if (td[t].innerHTML.match("_userName_") && (td[t].className == "headings" || (td[t].innerHTML.indexOf(">") != -1))) {
td[t].innerHTML = td[t].innerHTML.replace("_userName_",user);
}
}
//-->
</script>

<script type="text/javascript">
<!--
var td = document.getElementsByTagName("td") ;
for (k = 0; k < td.length; k++) {
if (td.item(k).className == "headings" && td.item(k).innerHTML.indexOf("Forum") != -1 && td.item(k).innerHTML.indexOf("#") != -1) {
td.item(k).parentNode.parentNode.removeChild(td.item(k).parentNode)
}
}
//-->
</script>

ElvisFan
06-10-2006, 07:49 PM
<script type="text/javascript">
/* QUICK REPLY by phalen180 */
/*
copyright 2005 phalen180
Please email serverfund at geke.net for info on how to donate to keep the
G E K E . N E T ezboard script archive going
*/

if ( document.location.href.indexOf(".showMessage") != -1 ||
document.location.href.indexOf(".showPrevMessage") != -1 ||
document.location.href.indexOf(".showNextMessage") != -1 ||
document.location.href.indexOf(".deleteSingle") != -1) {

/* Comment the lines below out or change the value to false
to assume that we will NOT include personal photo
or signature,
or use emoticons
or to show a link to the emoticon list
or to hide the subject box */


// For the following options
// use 0 for never,
// 1 for always,
// 2 to show checkbox (unchecked),
// 3 to show checkbox (checked)

includePersonalPhoto = 1;
includeSignature = 0;
useEmoticons = 3;
convertLinks = 3;
stayInTopic = 2;
showPreview = 2;
linkEmoticonList = true;

/*
use "text" for plain text,
"html" for HTML
and "choose" to show a dropdown */

// postType = "html";
// postType = "text";
// postType = "choose";
postType = "ezcodes";

showSubjectBox = true;
subjectSize = 60;
messageCols = 60;
messageRows = 4;

/* UNCOMMENT THIS ONE TO USE THE ORIGINAL STYLE */
// addReplyButton = document.getElementsByName("addreplybutton").item(1);

/* UNCOMMENT THIS ONE TO USE A TEXT ADD/REPLY BUTTON */
// foundels = getElementsByAttribute("a", "href", ".showAddReplyScreenFromWeb?", 0);
// addReplyButton = foundels[foundels.length - 1].childNodes[0];

/* UNCOMMENT THIS ONE TO USE AN IMAGE ADD/REPLY BUTTON */
addReplyButton = getElementsByAttribute("img", "alt", "Add Reply", 2)[1];

QRCell = addReplyButton.parentNode;
while ( QRCell.nodeName != "TR" ) {
QRCell = QRCell.parentNode;
}
QRCell = QRCell.getElementsByTagName("td").item(0);

QRForm = document.createElement("form");
QRForm.method = "post";
QRForm.action = addReplyButton.parentNode.href.replace(".showAddReplyScreenFromWeb", ".addReplyFromWeb");
QRForm.name = "PostMessage";

QRSubject = document.createElement("input");
QRSubject.value = "Re: " + document.title.replace(" - www.ezboard.com", "");
QRSubject.id = "quickreplysubject";
QRSubject.name = "subject";
if ( showSubjectBox ) {
QRSubject.type = "text";
QRSubject.className = "inputbox";
QRSubject.maxLength = 60;
QRSubject.size = subjectSize;
QRSubject.tabIndex = 3;
QRSubject.style.marginRight = "3px";
} else {
QRSubject.type = "hidden";
}

QRBody = document.createElement("textarea");
QRBody.rows = messageRows;
QRBody.cols = messageCols;
QRBody.id = "quickreplybody";
QRBody.className = "inputbox";
QRBody.value = "";
QRBody.name = "body";
QRBody.tabIndex = 4;

QRSubmit = document.createElement("input");
QRSubmit.type = "submit";
QRSubmit.className = "inputbutton";
QRSubmit.id = "quickreplysubmit";
QRSubmit.value = "Quick Reply";
QRSubmit.tabIndex = 5;

QRCell.align = "right";
QRCell.appendChild(QRForm);

/* Uncomment the commented lines to add labels for the two boxes */

// QRForm.appendChild(document.createTextNode("Subject: "));
QRForm.appendChild(QRSubject);
QRForm.appendChild(QRSubmit);
// QRForm.appendChild(document.createElement("br"));
// QRForm.appendChild(document.createTextNode("Message: "));
QRForm.appendChild(document.createElement("br"));
QRForm.appendChild(QRBody);

QRForm.appendChild(document.createElement("br"));

if (postType != "choose") {
QRpt = document.createElement("input");
QRpt.type = "hidden";
QRpt.name = "postType";
QRpt.value = postType;
QRForm.appendChild(QRpt);
}
else {
QRpt = document.createElement("select");
QRpt.name = "postType";
QRpt.appendChild(QRSelection("text", "Plain Text"));
QRpt.appendChild(QRSelection("ezcodes", "EZ Codes"));
QRpt.appendChild(QRSelection("html", "HTML"));
QRForm.appendChild(QRpt);
}

if ( includeSignature > 0) {
QRForm.appendChild(QROption("includeSignature","Include custom signature.", includeSignature));
}
if ( includePersonalPhoto > 0) {
QRForm.appendChild(QROption("includePersonalPhoto","Include personal photo.", includePersonalPhoto));
}
if ( useEmoticons > 0 ) {
QRForm.appendChild(QROption("emoticons","Use Emoticons.",useEmoticons));
}
if ( convertLinks > 0 ) {
QRForm.appendChild(QROption("convertLinks","Convert URL links.",convertLinks));
}
if ( stayInTopic > 0) {
QRForm.appendChild(QROption("stayInTopic","Stay in topic", stayInTopic));
}

if ( showPreview > 0) {
QRForm.appendChild(QROption('preview','Preview', showPreview));
}

if ( linkEmoticonList && ezFullPub != "") {
eListLink = document.createElement("a");
eListLink.href = "http://" + ezFullPub + ".ezboard.com/b" + ezBoardID + ".showEmoticonsHelp";
eListLink.target = "_blank";
eListLink.innerHTML = "complete emoticon list";
QRForm.appendChild(document.createElement("br"));
QRForm.appendChild(eListLink);
}
}

function QROption(sName, sLabel, iShowState) {
if ( iShowState > 0 ) {
QROpt = document.createElement("span");
QROpt.id = "span" + sName;
QRCheckBox = document.createElement("input");
QRCheckBox.name = sName;
QRCheckBox.id = sName;
QRCheckBox.value = "on";

if ( iShowState > 1 ) {
QRCheckBox.type = "checkbox";

// checkbox label
QRCheckBoxLabel = document.createElement("label");
QRCheckBoxLabel.htmlFor = sName;
QRCheckBoxLabel.innerHTML = sLabel;

if ( iShowState > 2 ) {
QRCheckBox.defaultChecked = true;
}
QROpt.appendChild(QRCheckBox);
QROpt.appendChild(QRCheckBoxLabel);
} else {
QRCheckBox.type = "hidden";
QROpt.appendChild(QRCheckBox);
}
return QROpt;
}
}

function QRSelection(sOption, sDisplay) {
QRSel = document.createElement("option");
QRSel.innerHTML = sDisplay;
QRSel.value = sOption;

return QRSel;
}
/* END QUICK REPLY */
</script>

<script language="Javascript" type="text/javascript">
if(document.location.href.indexOf("showMessage")!=-1){
for(k=0;k<document.links.length;k++){
getUser=document.links[k].parentNode
if((document.links[k].href.indexOf("PublicProfile")!=-1)&&(getUser.tagName.toUpperCase()=="SPAN")&&(typeof (getUser.className!="undefined"))&&(getUser.className=="title")){getUser.parentNode.parentNode.className=document.links[k].innerHTML.replace(/ /ig,"")}}}
</script>

<script type="text/javascript">
/* change registered members / logged in as text */

/* edit these to your own text */
var logged = "I'm not really";
var members = "Peeps hiding";
var members2 = "Peeps hiding - "; // community profile text

/* dont edit below here */
var td = document.getElementsByTagName("td");
var regmem = new RegExp("registered members","ig");
var regmem2 = new RegExp("total registered members:","ig");
var loggedinas = new RegExp("logged in as","ig");

for (k = 0; k < td.length; k++) {
if ((td[k].getAttribute("align") == "right" && td[k].getAttribute("valign") == "bottom") || (td[k].getAttribute("width") == "60%")) {
if (td[k].innerHTML.match(regmem)) {
td[k].innerHTML = td[k].innerHTML.replace(regmem,members)
}
if (td[k].innerHTML.match(loggedinas)) {
td[k].innerHTML = td[k].innerHTML.replace(loggedinas,logged);
}
}
if (td[k].innerHTML.match(regmem2) && (td[k].getAttribute("valign") == "top" && td[k].getAttribute("width") == "40%")) {
td[k].innerHTML = td[k].innerHTML.replace(regmem2,members2);
}
if (td[k].innerHTML.match(loggedinas) && (td[k].innerHTML.indexOf("showIdentityLink?redirectURL") != -1)) {
td[k].innerHTML = td[k].innerHTML.replace(loggedinas,logged);
}
}
/* end change registered members / logged in as text */
</script>

netbuddy
06-10-2006, 07:50 PM
</style> <-- whats this about? looks like its an orphaned tag.

ElvisFan
06-10-2006, 08:00 PM
Well, I just removed that, it changed nothing, so I put it back. Being rather new at this, what is an "orphaned tag" I feel like a dork asking that I hope you know.

netbuddy
06-10-2006, 09:28 PM
The </style> tag has no corresponding <style> tag opener. the tag appears within a script where it shouldnt.

ElvisFan
06-10-2006, 09:30 PM
So maybe, if I find the top of that particular script, it might solve the issue? God I feel so stupid.

netbuddy
06-10-2006, 09:48 PM
The point is that they are HTML tags and nothing to do with the script,

<script>
.... some stuff.... </style>
</script>

Is the type of thing you have going on...

ElvisFan
06-10-2006, 09:53 PM
I'm never going to get this to work, am I? ANy idea where to start to discombooberate this mess? They are all off of ezBoard Tips and Tricks help forums.

netbuddy
06-10-2006, 10:03 PM
Sorry, but simply slapping bits of code together does not make a programmer or script.

You will need to learn the basics of coding, structured languages etc, with plenty of effort on your part like reading through posts here and following some very useful member links, you will soon pick it up.

ElvisFan
06-10-2006, 10:27 PM
Well, I never thought I'd have the need to learn code, but since I've kind of been left with no choice, I need to figure something out. I was hoping to learn and get some pointers here. Perhaps by showing me where the problem might lie I could remember that for the next time.

phpnovice
06-10-2006, 10:43 PM
You should be checking for error messages -- as a start. Even if they don't pop up in front of your face does not mean that there aren't any. What browser do you test with? Also, a developer should never be without an Interactive JavaScript Debugger. Have you got one? This will also allow you to identify and fix problems easily.

ElvisFan
06-10-2006, 10:46 PM
Also, I have just finished reading the "help us to help you" sticky topic.

I have asked the worthless halfwits at ezBoard, they are as much help as my dog, as is the ezScript help board now in place. You get no response there at all.

This slider is supposed to scroll much like an odometer on a car, but it simply sits there frozen. I have narrowed it down to the Custom Footer, I have dome this by installing the same footer in the test board as is in the real board. Not having installed the original set of codes and having this board tossed in my lap, I'm at a loss. These codes are all greek to me. I have a friend who is trying to help me through this but even she is stumped with it. We see no reason why this isn't working, which is why I am turning to someone who might understand all this.

ElvisFan
06-10-2006, 10:59 PM
I have been using both IE7 and Firefox.

I was offered this tool: http://www.geke.net/ezboard/eztestboard.html

and shown this page: http://p079.ezboard.com/fcooltipsntricksfrm11.showMessage?topicID=40.topic

If any of it made sense to me I wouldn't be here asking people with intelligence. I am seeing no error messages anywhere on the board. At first I did, then we got it to show up without any errors but it will not scroll. If anyone has a different one I'm open to that option, I don't have to have THIS one, any quote bar will so. It might be this particular code thats an issue. I don't even know if it's HTML, Java or Javascript.

phpnovice
06-11-2006, 10:17 AM
For Firefox, there is the free download called the Venkman JavaScript Debugger. This, of course, also includes a DOM Browser for viewing the structure of all DOM objects. Otherwise, are you familiar with using the Firefox JavaScript Console for viewing error messages? With IE, if you don't have the option checked to display every error message, then you need to watch for the appearing of a little yellow triangle icon (with a black exclamation mark in it) at the left of the status bar. When it appears, double click it to open IE's equivalent of the JavaScript Console.

netbuddy
06-11-2006, 02:14 PM
Well, I never thought I'd have the need to learn code, but since I've kind of been left with no choice, I need to figure something out. I was hoping to learn and get some pointers here. Perhaps by showing me where the problem might lie I could remember that for the next time.

Well I pointed out earlier that you had a misplaced tag which shouldnt have been in that block of text as it had been marked out as being javascript.

You need to tell us what the error message is, you will need to wrap your code in a set of
try{
//your script here
}catch(e){
alert('Error '+e);
}
and tell us the error.