www.webdeveloper.com
Results 1 to 11 of 11

Thread: ie compiling, firefox, chrome not

  1. #1
    Join Date
    Oct 2012
    Posts
    8

    ie compiling, firefox, chrome not

    hey everyone,

    i am copying over an existing site for a customer http://www.acrisoils.co.uk/ is the original website which works fine, http://www.applmh.co.uk/ is my version of this, the relevant scripts have been copied over from what i can tell, IE displays my version correctly whilst chrome and firefox throw an error i belive the affending one is that "dtree" is not defined, can anyone point me in the right direction? thanks all

  2. #2
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    When you say you're copying the site, do you mean that you're downloading the files from the original site, and attempting to adapt them so that they'll work on their new home? I'm having a bit of trouble what's going on here, to be honest. I've had a look at the source code for each site. I see you've got quite a few scripts linked into to the web page, but I'm not sure what purpose they serve.

    The site is displaying wrongly in my browser, but that's more of a HTML/CSS problem than something caused by JavaScript. I can't actually see any JavaScript obviously doing anything on the page. If I were you, I'd probably (temporarily) comment out all of the various scripts, and work on trying to isolate what's going wrong with your stylesheets. I'm assuming that's the problem you were referring to. If not - please post again with further details. Original post was a little bit on the vague side, I'm afraid.
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

  3. #3
    Join Date
    Oct 2012
    Posts
    8
    hi daihuws

    sorry I was tired and that wasnt very clear ! yes I have grabbed the source code from the original site and now need to adapt this for their intended new host. i thought the JS was outputting the main nav bar but i could be wrong. ok ill try and comment out all scripts and work on the CSS, thanks for your reply.

  4. #4
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    No prob. Ah, I see. It wasn't immediately obvious to me what the purpose of all that JavaScript was, but I see now that there is a bit where if JS is turned off, it outputs the following:
    Code:
    <noscript>
    <ul>
    	<li><a href="/">Home</a></li>
    	<li><a href="/engine-oils.html">Engine Oils</a></li>
    	<li><a href="/hydraulic-oils">Hydraulic Oils</a></li>
    	<li><a href="/industrial-oils">Industrial Oils</a></li>
    	<li><a href="/greases">Greases</a></li>
    	<li><a href="/oilkem-products">Oilkem Products</a></li>
    	<li><a href="/contact-us">Contact Us</a></li>
    </ul>
    </noscript>
    I'd suggest removing the <noscript> tags and using that as the navigation bar. I honestly don't see the advantage of using JavaScript to write in the nav bar unless you have a site where the content of the navigation bar is expected to change very often. (And changing the navigation controls of a site often would be something that I'd strongly argue against - it'd be confusing and disorientating for repeat visitors.)
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

  5. #5
    Join Date
    Oct 2012
    Posts
    8
    hi daihuws

    have removed the scripts, the no script tags etc, can you see at all why the CSS is not working in firefox but it is in IE? thanks alot i do appreciate it

  6. #6
    Join Date
    Oct 2012
    Posts
    8
    ran it through a validator and it states i have a problem on line "-1" this is driving me crazy !!

  7. #7
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    Hi again. Just been having a play around with the code - downloaded the CSS and images to my computer so that I could work with a local version of the site. Which provided a useful clue. Usually I use wget's recursive download function to easily grab whole websites (http://www.linuxjournal.com/content/...-web-site-wget tells you how to do it). With this website it wouldn't do it, so I had to manually copy and paste the stylesheet & images URLs. Which was when I noticed that the paths in the HTML document used Windows-style backslashes rather than Unix-style forward slashes.
    i.e. the stylesheet links were of the form
    Code:
    <link rel="stylesheet" media="screen,handheld,projector,print" href="css\horizontal-nav-layout.css" type="text/css" />
    So - I've never seen this before, but I thought I'd try replacing the backslashes with forward slashes. Which seems to have sorted it out.
    The stylesheets section of my version of the site now looks like this: http://pastebin.com/5SUTT26F --
    If you just find and replace all of the backslashes with forward slashes that should hopefully resolve your problem.

    I don't have IE on my computer - doesn't run on Linux! - but the only browser that would display it correctly with the Windows-style paths was Opera.
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

  8. #8
    Join Date
    Oct 2012
    Posts
    8
    hi daihuws

    thanks for that, so just replace all the \ with / ? i tried that in the index file and it seemed to not change anything, might be temp files thou, humm ill have another look.

  9. #9
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    Yeah, that seemed to sort it out for me. The only other thing I changed on my local copy of the files was to add a closing </html> tag - which was missing.
    Oh, and I've just noticed that there's no <body> tag. But given that you've run it through a validator you'll have noticed that.
    If you ensure that your HTML is more or less valid - invalid HTML tends to lead to unpredictable behaviour - and change the \'s to /'s in the paths to your CSS files and images, then try clearing your cache and reloading the page. Hope it works.
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

  10. #10
    Join Date
    Oct 2012
    Posts
    8
    hi daihuws,

    thanks all your time here, sadly i still think i got somethign wrong, replaced all index css reference to "/" end html and body tags put in, cleared my cache, still appears the same, if you get chance would you take another look? many thanks.

  11. #11
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    Sure, I'll have another look at it. This is getting strange. I really don't think I changed anything else other than what I mentioned already. I love untraceable bugs.
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles