How can I run two identical syndication scripts on the same page?

I have a script received from our Sharp dealer to display machines on our website. When I add it twice with a different model (name-to-name), it only launches the first one and takes the image after it starts blinking on the page. I tried changing the div id of the second, but it did not work.

Example 1:

<script src='http://siica.sharpusa.com/DesktopModules/X3.Sharp.ProductCatalog/js/GetProduct.js' type='text/javascript' data-type='MFPs' data-name='MX-3050N'></script>
<div id='sharp-widget'></div>

Example 2:

<script src='http://siica.sharpusa.com/DesktopModules/X3.Sharp.ProductCatalog/js/GetProduct.js' type='text/javascript' data-type='MFPs' data-name='MX-3070N'></script>
<div id='sharp-widget'></div>
+4
source share
1 answer

Based on the source code you used above, you cannot at least get along without some workaround.

javascript "sharp-widget", HTML , jQuery .

script, , , , iframe , - :

<script src='http://siica.sharpusa.com/DesktopModules/X3.Sharp.ProductCatalog/js/GetProduct.js' type='text/javascript' data-type='MFPs' data-name='MX-3050N'></script>
<div id='sharp-widget'></div>

<iframe src="./inc.html" style="width: 100%; border: none">

</iframe>

inc.html

<script src='http://siica.sharpusa.com/DesktopModules/X3.Sharp.ProductCatalog/js/GetProduct.js' type='text/javascript' data-type='MFPs' data-name='MX-3050N'></script>
<div id='sharp-widget'></div>
0

Source: https://habr.com/ru/post/1627501/


All Articles