You are not logged in.

1

Monday, July 22nd 2013, 12:13am

onclick = " IF...."

I'm in front of a computer whole day, its getting late and i kinda need this urget.
I just need to figure how is IF properly set, what am i missing? *unsure*

Quoted


<hotspot name="spot3" style="hotspot_ani_white" ath="11.950" atv="7.138" onclick="
if(layer[text].visible==true)

set(layer[text].visible,false;
else
set(layer[text].visible,true;

"/>

Quoted


basicly, what i want is that when someone clicks on a hotspot he gets a message (textfield). if that textfield is already visible clicking would hide it.
Thank you in advance

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Monday, July 22nd 2013, 7:55am

Hi!

I think this should be like this:

Source code

1
<hotspot name="spot3" style="hotspot_ani_white" ath="11.950" atv="7.138" onclick="if(layer[text].visible == true, set(layer[text].visible,false);, set(layer[text].visible,true);  );"/>



Hope this helps *smile*
Regards,

Alexey