Latest Lists

Can someone please help me fix / debug a html / javascript error presenting in mozilla firefox?

Hi, I am experiencing problems with a html file that describes an ebay template listing. The code was initially working flawlessly for all major browsers bar internet explorer. This was ammended by defining a strict doctype, thereby placing internet explorer in standards compliant mode. However, this has now caused mozilla firefox to return what I deem to be a javascript error, for a crucial interactive menu midway down the page. I believe this menu utilises "jquery" for its operation / function / command. The page displays correctly in mozilla firefox when in quirks mode, however it breaks when a strict doctype is defined. I believe the error lies between lines 135 and ~150 of template_listing2.html, however I haven't the knowledge to fix it. I have a very limited knowledge and no history of coding. The majority of this coding was completed by a good friend of mine, who is no longer around to offer advice. I have done all I can to try and fix the code myself, and I would REALLY like to be able to finally put this code to use. Too much has gone into the code to see it left incomplete. Please, please help my fix this code. http://suresound.com.au/template_listing2.html http://suresound.com.au/ebayfiles/js/listing.js http://suresound.com.au/ebayfiles/js/listing.js <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> NB: The file "listing.js" normally includes code to generate the categories in the left sidebar. This has been intentionally removed. If anyone can solve this for me, I can send them 5 USD via paypal for their trouble. Not much I know, but it should buy a coffee?

Public Comments

  1. You have nested comments in your HTML. Firefox treats nested comments differently than IE or Chrome. The problem starts here: <!--<h2 id="sxs-videoheader"><span>Video</span></h2> 7 lines later, you have: <!--Video //end--> IE treats the end--> as ending the comment that started with <!--<h2 id. Firefox sees it as ending <!--Video, but the <!--<h2 id is still an open comment, which takes out a huge chunk of code. I think you just need to close the first comment before the next: --> <!--Video //end--> You may have a second problem about 20 lines later where you have: <!-- var AP_ContentVersion = 6; Oddly, Firefox is ending that comment about 8 lines later, with the > in this line: var AP_CanPlayFlash = AP_FlashPluginVersion >= AP_ContentVersion; So all the javascript after that gets splatted out on the page as text. I'm not sure if your intention was to comment out this code. If so, use /* and */ inside a javascript block to comment out multiple lines. If not, get rid of the opening AND closing comments in that block. FYI, you can see what is going on fairly easily when you view source in FireFox. Pay attention to the colors. Green means comment, so you can easily see where FF thinks your comments start and end.
Powered by Yahoo! Answers