It will display SatSales.js but will not change to other js file days like it does if i use code alone. When I put <head> in my html <head> and <body> with <body> in my page I just get SatSales.js. But it will not change days like it suppose to. How do i use it in web page?Thanks!
and used <body> tag to start off my body. I started “<style type=“text/css”>” at beginning of head and eliminated the other opened ones to make one </style> for other styles in head. It took me almost whole weekend. It appears to be working. I used a test site on my server at:
Trouble-shooting sure can be aggravating at times. Sounds like you deserve a well earned break - maybe put a little bit of your lost weekend into today. :drinky:
I know it’s a bit of work, but the easiest way to figure it out is to add the CSS and javascript files that are in the non-working page to the working page one-by-one until the working page breaks. Then it’s easier to know what file to look at to see where the clash is.
If you can figure out what file breaks it, I’ll be happy to look at it for you.
I guess if I was doing it, I wouldn’t load all 7 javascript files into divs, only using 1 and hiding the others. For efficiency’s sake, I would use javascript to change the script tags src value instead.
Anyway, I tried the simplified version of the page as you posted in this thread and it works for me. I got Wed yesterday and I get Thu today.
There must be a conflict with the other CSS and/or javascript somewhere. There’s quite a bit but I’ll dig some more when I get a chance.
Did this work before at anytime and only “break” when you made a change somewhere - i.e. started using another CSS/javascript file ??
Out of curiousity, if you make another day “last” instead of Saturday, is that the one and only one that works?
The simplified version works by itself, but when I tried to place in my page I only get saturday. The only thing i did was put the head part of script in my head html and the body in my body part of page. That is only thing i changed.
No, it was to have one day at time show for 8 different orders 7 days. I have SunSales.js Thru FriSales.js files. When I run code above it works good. When I put in site I already have, it just shows SunSales.js orders. I would like it to show according to day. Thanks!
I imagine the script was written with the intention of having only one “day” on a page. But if you are going to have every “day” on a page at the same time you could try changing the javascript code to
var str = '';
str += '<div class="apDiv10">';
Any reference in the CSS for #apDiv10
will “break” as it would be
.apDiv10
instead. And you may need to tweak the CSS (i.e. lose the absolute position) as they may all end up taking up the same space on the page - but test and see first, maybe not.
In this use it isn’t javascript, but an HTML tag attribute.
i.e. - “id” vs. “class”
An id attribute should have a unique value. But class attributes with the same value can be in more than one tag.
Attributes can be used both by javascript and CSS so the multiple occurence of the same id value could be causing a problem with both or either.
If you run the page through the w3c validator (ignoring the Warnings for now) and click the “help” for each Error, AFAIK they give good examples of the problems and suggest on how to fix them.