Title: changing php through javascript (screen resolutions)
Last modified: August 18, 2016

---

# changing php through javascript (screen resolutions)

 *  [niksterg11](https://wordpress.org/support/users/niksterg11/)
 * (@niksterg11)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/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.

## Tags

 * [album](https://wordpress.org/support/topic-tag/album/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [screen](https://wordpress.org/support/topic-tag/screen/)

 * 0 replies
 * 1 participant
 * Last reply from: [niksterg11](https://wordpress.org/support/users/niksterg11/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/changing-php-through-javascript-screen-resolutions/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
