aprillougheed
asked on
firefox breaks with javascript code - URGENT - NEED HELP SOON
The following script breaks in Firefox ... exactly at this point.
I know there is a problem with the wrong spaces around HTML comments. But I just sent this page to a client and if they use Firefox I'm screwed. I'll keep looking for solution - but hoped an expert could quickly explain it to me.
<" + "/script>"); //-->
I know there is a problem with the wrong spaces around HTML comments. But I just sent this page to a client and if they use Firefox I'm screwed. I'll keep looking for solution - but hoped an expert could quickly explain it to me.
<!-- START PHP2 CODE for Top of Category Pages -->
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.domain.com/banner/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:1");
document.write ("&exclude=" + document.phpAds_used);
if (document.referer)
document.write ("&referer=" + escape(document.referer));
document.write ("'><" + "/script>");
//-->
</script>
<noscript>
<a href='http://www.domain.com/banner/adclick.php?n=a83d5880' target='_blank'><img src='http://www.domain.com/banner/adview.php?what=zone:1&n=a83d5880' border='0' alt='' /></a>
</noscript>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi. Thanks for your response to my urgent request. Unfortunately - all heck broke loose and now I have to make an emergency trip out of town to help my Mom.. Forgive my rushed comments below.
I worked on this issue for hours today. I installed this link directory script over TEN years ago. When I started looking through the code today - it's a huge mess.
I tried the code you suggested, but that didn't seem to fix the problem. You are obviously really smart about these things - because I do not even know what concatenation is or what you mean by "post the resulting script".
Do you mean the source code from the page?
I'm a little paranoid about posting links to my actual site. Indeed, I just found some hacked code today that was displaying very nasty images. I don't know why anyone would want to hack me. Or how it happened. So I usually make it a rule not to post code of my actual site. I'm too inexperienced to know what I might post that would expose a security vunerability.
Am I worrying needlessly?
NOTE: I'm toying with giving up on this old script. It's from Gossamer Threads. I would consider going back to Gossamer Threads and paying them to fix the script - but I'd like to get it working on Firefox and see if I can sell some advertising before I sink more money into into. I guess I'd like to think I could fix it - I hate to go running to them everytime there is an issue. I've already poured over every single file in the cgi-bin directory. There are a lot of them. And I know the interface pretty well.
I've even already purchased another script http://www.phplinkdirectory.com/ - but that will be another nightmare trying to transfer 10,000 links from my old MySql.
What do you think? Start over completely with a different script - or keep trying to fix this one?
Sorry this message isn't very well thought-through. Appreciate any help you can provide.
I worked on this issue for hours today. I installed this link directory script over TEN years ago. When I started looking through the code today - it's a huge mess.
There are a bunch of HTML comment tags that FIrefox doesn't like.
Sometime in the last few years I changed the document type and ... well, it's all a mess. I'm looking at weeks to get it fixed.
I tried the code you suggested, but that didn't seem to fix the problem. You are obviously really smart about these things - because I do not even know what concatenation is or what you mean by "post the resulting script".
Do you mean the source code from the page?
I'm a little paranoid about posting links to my actual site. Indeed, I just found some hacked code today that was displaying very nasty images. I don't know why anyone would want to hack me. Or how it happened. So I usually make it a rule not to post code of my actual site. I'm too inexperienced to know what I might post that would expose a security vunerability.
Am I worrying needlessly?
NOTE: I'm toying with giving up on this old script. It's from Gossamer Threads. I would consider going back to Gossamer Threads and paying them to fix the script - but I'd like to get it working on Firefox and see if I can sell some advertising before I sink more money into into. I guess I'd like to think I could fix it - I hate to go running to them everytime there is an issue. I've already poured over every single file in the cgi-bin directory. There are a lot of them. And I know the interface pretty well.
I've even already purchased another script http://www.phplinkdirectory.com/ - but that will be another nightmare trying to transfer 10,000 links from my old MySql.
What do you think? Start over completely with a different script - or keep trying to fix this one?
Sorry this message isn't very well thought-through. Appreciate any help you can provide.
ASKER
I have it working. Guess it was all a problem with HTML comments. I found one buried in the template global for the links.
I still have a lot of work to do to make the site standards compliant. But it's working now.
Appreciate your help.
I still have a lot of work to do to make the site standards compliant. But it's working now.
Appreciate your help.
ASKER
Solution was OK - but I had not given enough info to explain the problem.
ASKER
Please note this is a link directory program. The code in questions is a php banner rotating script.
Open in new window