PDA

View Full Version : Missing CSS and Images


yoursif
31-Jul-2006, 10:28 AM
I can view all of the images and the correct css in the site until I want to view the basket or go to a cgi page. Then all the formatting through css and images are missing. I have tried uploading the images & css into the directory that thy are meant to be located according to the browser but still nothing. Any idea's?

www.yoursif.com (http://www.yoursif.com) if you want to check out the problem try putting something into the shopping cart.

Bruce
01-Aug-2006, 07:44 AM
Hi Phil,

I had a look at the site and I think I know what the issue is. Checking the
source of the site I cannot see an onload command, this is required for the
images etc to be displayed when using cgi-bin linked URL's. In your Primary
template add

OnLoad="NETQUOTEVAR:ONLOAD"

into the opening body tag, save the template and then update the site. Let
me know if this helps.

Kind regards,

yoursif
01-Aug-2006, 08:08 AM
Bruce
I have added in this line to the act_Primary HTML page but still the images and CSS formatting do no appear.

<body OnLoad="NETQUOTEVAR:ONLOAD">

I have registered a support query, and they suggested that I should check the settings in Design | Options | Layout but I have done this to no avail.
Do you have any other suggestions?

yoursif
01-Aug-2006, 08:41 AM
I had a look at the firefox java console and it brought up billions of errors on this line...

<html><head><meta http-equiv=Content-Type content="text/html; charset=UTF-8"><script></script></head><script>try {var loaded=true;if (top.js.init) {top.js._GP(window);}} catch(e) {}</script></html>

also I noted I have two sets of <body></body> tags in the document. Not entirely sure if thats got anything to do with it but it doesn't strike me as very normal.

Any suggestions would be welcome.

NormanRouxel
01-Aug-2006, 08:44 AM
I see an additional problem. You seem to have 2 spurous complete HTML pages embedded in the middle of your proper page. I see the block<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p>&nbsp;</p>
</body>
</html>twice. Check the Primary Template that you use for the cart and remove these junk blocks.

NormanRouxel
01-Aug-2006, 08:46 AM
Also these pages end</body>
</html><br></td></tr></tbody></table></td></tr></tbody></table> <br><br><br>Put more menu items here!</td></tr></tbody></table></body></html> so there's a spurious </body></html>.

yoursif
01-Aug-2006, 09:29 AM
I see an additional problem. You seem to have 2 spurous complete HTML pages embedded in the middle of your proper page. I see the block<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p>&nbsp;</p>
</body>
</html>twice. Check the Primary Template that you use for the cart and remove these junk blocks.

The problem is because this is only happening in the cgi pages I can't put my finger on what file to change. The act_primary and act_shoppingcart seems to be fine. There is no duplicated HTML in it. Do I need to change one of the perl files in the cgi-bin to sort this out? Could it be loading in navigation bars for the sidebars as full html pages?

NormanRouxel
01-Aug-2006, 09:41 AM
There also seems to be one spurious block on all your product pages.

Look in Design / Options / Layouts / Primary Templates to see the ones used for the various phases of the catalog.

If you don't find it there then you can go to Design / Options / Miscellaneous and uncheck Compact HTML/CGI. This will add comments around all generated code showing what template is involved. This should help you locate said junk. Don't forget to re-check Compact HTML/CGI afterwards.

yoursif
01-Aug-2006, 01:15 PM
Ok well I have definately found one problem...

filename="C:\Program Files\Actinic v7\Sites\Site1\Act_Primary.html"/>

should not be in the header for the HTML page. Any Idea's how to change it?

cdicken
04-Aug-2006, 09:03 AM
Ok well I have definately found one problem...

filename="C:\Program Files\Actinic v7\Sites\Site1\Act_Primary.html"/>

should not be in the header for the HTML page. Any Idea's how to change it?Those are just put there by the Actini/Dreamweaver interface. The will go once you select 'Compact HTML/CGI' in 'Design | Options | Miscellaneous'

yoursif
04-Aug-2006, 02:35 PM
Thanks for all your help eveyone - edventually I pinned it down to adding this into the body tag...

<BODY TEXT="NETQUOTEVAR:FGCOLOR" topmargin="0" marginwidth="5" marginheight="0" OnLoad="NETQUOTEVAR:ONLOAD" NETQUOTEVAR:BGIMAGE NETQUOTEVAR:BGCOLOR NETQUOTEVAR:LINKCOLOR NETQUOTEVAR:VLINKCOLOR NETQUOTEVAR:ALINKCOLOR>

I think it had something to do with the onload event not being declared properly the first time making the images and css all go wonky.

Cheers for the support.

Phil
Yoursif.com

NormanRouxel
04-Aug-2006, 05:27 PM
It was probably those spurious <body> tags causing this (they follow the real one and would probably undefine the onLoad event).