You are not logged in.

Bosanza

Beginner

  • "Bosanza" started this thread

Posts: 3

Location: Milano, Italy

Occupation: Director of Photography

  • Send private message

1

Monday, February 8th 2021, 10:11pm

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):

Source code

1
2
3
4
5
6
<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.

2

Monday, February 8th 2021, 10:23pm

you had syntax errors in your code ...

Source code

1
2
3
4
5
6
<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));" 
    	/>

This post has been edited 2 times, last edit by "indexofrefraction" (Feb 10th 2021, 5:34pm)


Bosanza

Beginner

  • "Bosanza" started this thread

Posts: 3

Location: Milano, Italy

Occupation: Director of Photography

  • Send private message

3

Wednesday, February 10th 2021, 5:27pm

Thank you a lot.


Also yours was not working but there were a ' missing after the second URL...

Thanks a lot!