PDA

View Full Version : Problem, possibly with script



younghelpdeskguy
11-14-2005, 06:42 PM
Hi all, I'm having a problem. When I build a webpage using bluevodas builder, everything looks fine. But when I publish pages, things start looking bad. Pictures overlap text, text doesn't match pictures, etc.. Some pages, however, look fine. The only thing in common about all the pages that worked is that they all had this piece of code under the meta name html code:<SCRIPT language="JavaScript">

<!--

function SwapImage()

{

var doc=document, args=arguments;

doc.$imgSwaps = new Array();

for(var i=2; i<args.length; i+=2)

{

var elem=FindObject(args[i]);

if(elem)

{

doc.$imgSwaps[doc.$imgSwaps.length]=elem;

elem.$src=elem.src;

elem.src=args[i+1];

}

}

}

function FindObject(id, doc)

{

var child, elem;

if(!doc)

doc=document;

if(doc.getElementById)

elem=doc.getElementById(id);

else

if(doc.layers)

child=doc.layers;

else

if(doc.all)

elem=doc.all[id];

if(elem)

return elem;

if(doc.id==id || doc.name==id)

return doc;

if(doc.childNodes)

child=doc.childNodes;

if(child)

{

for(var i=0; i<child.length; i++)

{

elem=FindObject(id,child[i]);

if(elem)

return elem;

}

}

var frm=doc.forms;

if(frm)

{

for(var i=0; i<frm.length; i++)

{

var elems=frm[i].elements;

for(var j=0; j<elems.length; j++)

{

elem=FindObject(id,elems[i]);

if(elem) return elem;

}

}

}

return null;

}

// -->

Has anyone else experianced this problem? Any help would be appreciated. Thanks

VodaHost
11-14-2005, 07:10 PM
what the url so we can take a look...

younghelpdeskguy
11-14-2005, 07:49 PM
here's one: http://www.closetohomeneedleworks.com/3.html

VodaHost
11-14-2005, 11:50 PM
yeah...that is really horrible...what did u do? possibly the script?