Page 1 of 1

Javascript Page (Just like Stylesheet)

Posted: Wed Jul 03, 2013 1:12 pm
by literayz

I like Protoshare!

However, I am finding myself banging my head on things and wishing I could accomplish something that cannot be done with the system.


I want to create a large bank of buttons that can be toggled on/off. This is to replicate an "add points" system for a mobile app. I have about 30 buttons (with more to come). Now I could create a state with 30 entries and control each button based on a selection from the state list but let's face it, that is really inefficient and time consuming.

What I really want to do is give each button a single class name and then include jQuery and a short script to handle the functionality. The problem is that when I input my scripts in a source block everything is contained inside an iframe and thus I cannot effect regular stencil/block items in the wire frame.

If I could add scripts to the main wire frame via a JS file(not in an iframe), much like the stylesheet, I could easily deal with the functionality in roughly 2-3 minutes. That would be a super efficient and flexible method.

So my request is that you give us a JS file similar to the css file in which we can work some JS magic.


Re: Javascript Page (Just like Stylesheet)

Posted: Fri Jul 05, 2013 10:51 am
by Nick Jennings
Hi Christian,

I believe we spoke the other day on live chat briefly about this. I've passed it along to our developers as a requested feature for a future release.

If you have any additional requests, feel free to post them.

Re: Javascript Page (Just like Stylesheet)

Posted: Sat Jul 06, 2013 10:17 pm
by literayz

Thanks for the response. I think I posted this before our chat session. Anyway, thanks for passing this idea along!

You know I only live about 40 minutes from your office in Portland? That's kind of cool.

Re: Javascript Page (Just like Stylesheet)

Posted: Sat Jan 31, 2015 11:53 am
by trisys
Did this get resolved?
Can we have scoped Javascript at the page level so that we can share state/variables etc..?

Re: Javascript Page (Just like Stylesheet)

Posted: Tue Feb 03, 2015 2:28 pm
by Nick Jennings

There hasn't been any updates for this. It is something that we would like to add, but there are multiple changes that need to be done before it can be added. As of now, the Advanced HTML component works in a specific iFrame and it cannot interact with components from the palette unless it is to change a state. Since states only change visibility of components, it is not a proper way to achieve this.

When there is more information, we will update this thread.