Javascript Button calling external

Having the worst time with this. I know it’s easy to build a text link however making a button is making me go around the corner and beat my head to the wall.

My question can i call an extenal function to call HYPE.functions… thanks I think i might have this once i wrap my head around this. :slight_smile: javascriptBTN.hype.zip (18.3 KB)

Ok I have solved this with the first link, but i’m having troubles understanding this syntax HYPE.documents(‘index’) now this index here should be the name of the hype document? index.html? is this what it represents if we save it as index.html? What happened if we renamed our export to index2.html? Does this make the syntax change as HYPE.documents(‘index2’)?