Title: calling javascript experts!
Last modified: August 18, 2016

---

# calling javascript experts!

 *  [cyber6](https://wordpress.org/support/users/cyber6/)
 * (@cyber6)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/calling-javascript-experts/)
 * How do I get the following scripts to work on the same page?
    They work together
   in IE but not in Firefox and Mozilla. <script language=”JavaScript” type=”text/
   javascript”> function imgRefresh () { if (document.images) { rfsh = new Date();
   rfsh = “?”+rfsh.getTime() document.images[“webcam_picture”].src = ‘[http://www.aeroport.lu/webcam/webcam1.jpg?’+rfsh](http://www.aeroport.lu/webcam/webcam1.jpg?’+rfsh);}
   setTimeout(‘imgRefresh()’,60*1000); } </script> <left> <img src=”webcam1.jpg”
   width=”130″ name=”webcam_picture” alt=””><br> [](https://wordpress.org/support/topic/calling-javascript-experts/index.html?output_format=md)
   </center> <p align=”left”> <script language=”JavaScript” type=”text/javascript”
   > imgRefresh(); </script> <script language=”JavaScript” type=”text/javascript”
   > function imgRefresh () { if (document.images) { rfsh = new Date() ; rfsh = “?”
   +rfsh.getTime() document.images[“webcam_picture”].src = ‘[http://www.aeroport.lu/webcam/webcam2.jpg?’+rfsh](http://www.aeroport.lu/webcam/webcam2.jpg?’+rfsh);}
   setTimeout(‘imgRefresh()’,70*1000); } </script> <left> <img src=”webcam2.jpg”
   width=”130″ name=”webcam_picture” alt=””><br> [](https://wordpress.org/support/topic/calling-javascript-experts/index.html?output_format=md)
   </center> <p align=”left”> <script language=”JavaScript” type=”text/javascript”
   > imgRefresh(); </script> So, as you can see I want to call up 2 webcams from
   the local airport on the same page. You can see that 1 is running @ [http://www.cyber6.org](http://www.cyber6.org)
   Thanks in advance. Neil

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [lbessant](https://wordpress.org/support/users/lbessant/)
 * (@lbessant)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/calling-javascript-experts/#post-95492)
 * Try giving each picture a different “name” attribue. I’ve had something similar
   working with a script much like yours, and it wasn’t a big problem.
    You also
   have two functions on the page with the same name, which is possibly a problem.
   Try changing the function names to img1Refresh and img2Refresh, and the names
   to “webcam_picture1” and “webcam_picture2”. Also remember to change the document.
   images[“webcam_picture”] bit in each script by adding the appropriate number.
 *  Thread Starter [cyber6](https://wordpress.org/support/users/cyber6/)
 * (@cyber6)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/calling-javascript-experts/#post-95735)
 * Mant thanks Ibessant-now working!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘calling javascript experts!’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [cyber6](https://wordpress.org/support/users/cyber6/)
 * Last activity: [21 years, 6 months ago](https://wordpress.org/support/topic/calling-javascript-experts/#post-95735)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
