Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Document Question

Avatar

Level 3

Thanks for reading.  I am creating a form that is using a Mousein and Mouseout script.  My idea is that when I hover over a specified spot on a map, I am using a button without any fill color, border color or text, have text appear showing the name of that location.  I currently have the javascript as subform.presence = "visible" (for when I am entering the button) and subform.presence = "hidden" (when I am exiting the button).   This part works fine if I save after editing the script, but when I try to add another section on the same page where I have a closer view of a building with a similar button idea over specific doors, it does not work.  If I save the document after editing the javascipt, it works, but does not work in the part above.  I would also like to have buttons to show each side of the building, north, south, east, and west.  Then as I click on each button, the view comes into play and the previous one goes away, but the presence script I am using:


if (this.parent.subform.presence == "hidden") {

this.parent.subform.presence = "visible";

}

else {

(this.parent.subform.presence = "visible")

}

First off, does this all make sense?  Second, does anyone have an idea on how to make this work?  I would attach the form to this, but I have no idea how. 

Thanks for reading.


Justin

5 Replies

Avatar

Level 10

in both statements above, you want to subform to be visible... no matter what

Avatar

Level 3

Thanks for getting back to me.  I guess I am a little confused to your response.  I have never used the MouseEnter or MouseExit scripts before, but the other one I am using to show or hide an entire page, click once the page is shown, click again, it hides, but it is not working for subforms, only full pages.  Is what you are saying is that my code is incorrect?  Any idea what'll make it work?


Thanks again for the reply

Justin

Avatar

Level 10

if (this.parent.subform.presence == "hidden") {

this.parent.subform.presence = "visible";<-- you set the subform visible if it's hidden

}

else {

(this.parent.subform.presence = "visible") <-- you set the subform visible if it's visible

}

You never hide your subform

Avatar

Level 3

Gotcha.  That makes sense. Is there a way I could send you the document to see if you can make sense of it?  I am at a lose at thsi point...


Justin