Using variables and IF on popup hotspot

  • I'm trying to change the opening of a popup depending on the "lingua" variable but I just can't figure out how to do it ...
    That's what I done and it doesn't work at alla (fatal error):

    Code
    <hotspot name="spot2" style="infospot"
        	html="Web"
        	ath="0.000" atv="0.000"
        	onloaded="circlepos(2,5);"
        	onclick="if(lingua == 1, 
        	"popup('iframe', 'https://bosanza.com', 800, 600, true);","popup('iframe', 'https://gavdos.info, 800, 600, true);""/>


    Thanks a lot for your help.
    Matteo.

  • you had syntax errors in your code ...

    Code
    <hotspot name="spot2" style="infospot"
        	html="Web"
        	ath="0.000" atv="0.000"
        	onloaded="circlepos(2,5);"
        	onclick="if(lingua == 1,popup('iframe','https://bosanza.com',800,600,true),popup('iframe','https://gavdos.info',800,600,true));" 
        	/>

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!