changing php through javascript (screen resolutions)
-
hi,
My problem is that if you go to (overserio.us) and look to the bottom right, you might or might not see a balanced “Listening” module. It depends on your screen resolution.What I want to do is set up some javascript inside of my listen.php code so that it will judge how many little album covers to show at different screen resolutions.
This is about the closest I have been able to find on the subject, but this just changes the background image (no use to me).
<script language=Javascript> <!-- var background if (screen.height == 600) && (screen.width == 800) { background = ""; document.write (background); } elseif (screen.height == 768) && (screen.width == 1024) { background = ""; document.write (background); } else { background = ""; document.write (background); } --> </script>
Here’s the php I want changed:
<?php get_links(3, '<li>', '</li>', '', TRUE, 'rand', FALSE, FALSE, 8, FALSE); ?>
See the 8? I want it changed to either a 6, or whatever number balances out the grid.
- The topic ‘changing php through javascript (screen resolutions)’ is closed to new replies.