Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   Web Design and Hosting (http://www.mac-forums.com/forums/web-design-hosting/)
-   -   Stack Layout? (http://www.mac-forums.com/forums/web-design-hosting/120717-stack-layout.html)

m_leather 08-22-2008 07:19 AM

Stack Layout?
 
I'm fairly new to Javascript. I've spend a good few hour studying Javascript, reading the Dascode manual, and peering over the sample code provided with Dashcode and simply cannot work out how to initiate a change of view in a stackLayout.

I basically want a button that will change from one view to another when clicked.

I've inserted a 'stacklayout' in the 'content' area and a button.

I've tried:

Onclick: document.getElementById("view1")

But that is clearly wrong.

What is the correct way?

Thanks in advance,

Matt

MWSO 11-06-2008 08:21 PM

Well Here Your Problem!
 
i'm new too but i know this will change views in stack layout!

var currView = document.getElementById("elementID");
stackLayout.object.setCurrentView(currView,false);

i am now trying to get it to do transitions so don't ask me about that:D
if you find out tell me!


All times are GMT -4. The time now is 03:53 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.