Title: Javascript help to fix problem page.
Last modified: September 7, 2018

---

# Javascript help to fix problem page.

 *  [nclibraries](https://wordpress.org/support/users/nclibraries/)
 * (@nclibraries)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/javascript-help-to-fix-problem-page/)
 * Hiya all,
 * I need some help in writing some javascript to mend an issue on a page of my 
   website.
 * Problem 1. You can see that the four tabs on this page should each have an interactive
   map. Only the first tab displays the map. This is a known problem with the H5P
   content that I have used to make the maps. It doesn’t know the size of the tab
   and so defauts to a 0 size for display. If you click on one of the tabs and then
   hit restore on your browser, the map will get the size info it needs and will
   display. I have been informed on the H5P forum that I need to add a script:
 * window.dispatchEvent(new Event(‘resize’));
 * This should be triggered every time one of the four tabs is clicked. Is there
   a way to put this in a script in the header so that the script will be active
   all the time a visitor is on the page?
 * 2. Sometimes the initial view of the first map is bigger than the tab. I have
   set the iframe dimension to a suitable size but it doesn’t always work.
 * Many thanks in advance,
 * Nige.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-help-to-fix-problem-page%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [siddhartha](https://wordpress.org/support/users/siddhartha10jun/)
 * (@siddhartha10jun)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/javascript-help-to-fix-problem-page/#post-10667558)
 * Hello [@nclibraries](https://wordpress.org/support/users/nclibraries/)
 * This issues is only view issue or loading issues i think you put a script in 
   footer section most probably your issues resolved.

Viewing 1 replies (of 1 total)

The topic ‘Javascript help to fix problem page.’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [siddhartha](https://wordpress.org/support/users/siddhartha10jun/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/javascript-help-to-fix-problem-page/#post-10667558)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
