If you had a table, where, by js, css and crons, the table rows were auto changing colours (striped), and you wanted all of the rows of that table to be included from another website by PHP includes, how would you personally do it please? I have tried a few attempts at it, and when it’s an ordinary table, the rows change colours with no problems, but as soon as you try to do PHP includes into it, the colouring isn’t working! Any ideas how you get round that one please?
None at the moment, but just trying to see how this could be done really. you can auto change the colors of rows via css and js, but then, when you view a page that is as a result of php includes, the colors then go back to their original color.
Basically, is there a way of having the tbody of a table coming from another website via a php include AND having some of the table rows automatically change their colors for the striping effect please?
Using the zebra striping effect, it changes the table rows, but, if some of those table rows are coming in from another website, via a php include, it then loses the zebra affect.
Just wondering if anyone here, especially those very familiar with the zebra effect have found a way to get round this?
“None at the moment, but just trying to see how this could be done really. you can auto change the colors of rows via css and js, but then, when you view a page that is as a result of php includes, the colors then go back to their original color.”
Which… says to me “There exists a page which this code runs on”… because in order to know that it doesnt work, you have to have had a page in which it has done so.
Unless you’re just absolutely GUESSING that the page wont work, in which case you’re asking about a problem you dont have.
In either case, i’m done with this thread until you actually have a page you’re trying to fix.
You seem confused! I know from experience, that the zebra effect combined with php includes don’t work, so am trying to see if anyone here knows of a way around it - quite simple really!
My point is - TRY IT YOURSELF FIRST. stop asking about a problem that you dont have because you havent tried it and gotten stuck on it. TRY it, and if it doesnt work, THEN come ask questions about why it doesnt work. You’re assuming it’s not going to work based on… seeing something sometime that you cant see the code to and are unable to reproduce.
Assuming you’re talking about standard js (and not AJAX), I can guarantee that the problem is NOT PHP. Period. They work in completely different runtimes. By the time JS sees the code, it’s static HTML. Same as any other page in the world.
As StarLion said, though, PHP operates on the server, so JS just sees the final product and operates on that, includes or not. So the JS zebra striping won’t be affected by includes. Rather than assume you will have problems, just give it a go, and then if there are problems, we can look at why.