I have a text object that when clicked, it shows a circle around it. I placed the circle visable in the click event of the text object, but how do I get to to dissapear if I click on the text object again?
Solved! Go to Solution.
Views
Replies
Total Likes
The Variable is not persisted past the life of your program ...so when the doc Ready event finishes the variable is gone. So you need some othe way to know if the circle is on or off .....why not check the presence of the circle and toggle it accordingly.
if (Circle1.presence = "visible"){
Circle1.presence = "hidden"
} else {
Circle1.presence = "visible"
}
Paul
Views
Replies
Total Likes
Use an "if" "else" statement.
Post the code you are using to make it visible and we can add the "else"
Views
Replies
Total Likes
Circle1.presence = "visible";
I tried adding var OnOff = "Off" in the docready event and then adding to the click event of the text object:
if (OnOff == "Off")
{
Circle1.presence = "visible";
OnOff = "On";
}
else
{
Circle1. presence = "hidden";
OnOff = "Off";
}
But this doesn't work either.
Views
Replies
Total Likes
The Variable is not persisted past the life of your program ...so when the doc Ready event finishes the variable is gone. So you need some othe way to know if the circle is on or off .....why not check the presence of the circle and toggle it accordingly.
if (Circle1.presence = "visible"){
Circle1.presence = "hidden"
} else {
Circle1.presence = "visible"
}
Paul
Views
Replies
Total Likes
Worked really well. What would you suggest I do to assign a value for if the circle is visible? I need to send the value of the circled text object to the xml file that I send via email.
Views
Replies
Total Likes
Then create a hidden field that will hold the on/off value and update that when you toggle the circle on off.
Paul
I was thinking there might have been another way, but it works. Thanks.
Views
Replies
Total Likes