How to call another view on onClick event of button?

465 views
Skip to first unread message

Manu Misra

unread,
Aug 10, 2011, 2:50:46 AM8/10/11
to Maqetta Users
I have created 2 views on same html file <on coding side they are
represented as two different div id's>
On my first div or view i have created a button, i tried using
javascript onclick along with this button for moving to next view on
onclick event of this button, but it didn't work.
I even do not see a moveTo attribute along with button.
Can you give me idea how to achieve this?

And also the same question for a scenario where both the view lies on
two different html files.

Thanks in advance
Manu

Manu Misra

unread,
Aug 10, 2011, 3:47:04 AM8/10/11
to Maqetta Users
And also i want to know how cant i decrease the height of scroll view

Javier Pedemonte

unread,
Aug 10, 2011, 11:30:27 AM8/10/11
to maqett...@googlegroups.com
I assume from what you wrote that you are playing with the Dojox Mobile Views.  Please take a look at the Mobile UI Tutorial (http://maqetta.org:55556/maqetta/app/docs/index.html#tutorials/tutorial4), which will explain how to currently use the Dojox Mobile widgets in Maqetta Preview 2.

> On my first div or view i have created a button, i tried using
> javascript onclick along with this button for moving to next view on
> onclick event of this button, but it didn't work.
> I even do not see a moveTo attribute along with button.

Only some Dojox Mobile widgets supper the moveTo property: Heading, ToolBarButton (which can be placed inside of Heading), ListItem (member of RoundRectList or EdgeToEdgeList), TabBarButton (member of TabBar).

There might be a way to do it on other widgets (like Button), but you would probably have to create some JavaScript code which gets called from the onClick event.

> And also the same question for a scenario where both the view lies on
> two different html files.

I don't believe this is supported with Dojox Mobile Views -- they are meant to be all on the same HTML page.

But if you wanted, you could listen on the onClick event for a widget within a View and just load a new page (which itself may contain more Dojox Mobile Views).

And also i want to know how cant i decrease the height of scroll view
 
The View containers (View, ScrollableView, SwapView) are meant to represent the full screen of a mobile device.  As such, their height is always 100%.


Javier
- maqetta team
Reply all
Reply to author
Forward
0 new messages