Software Archive
Read-only legacy content
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

Still Stuck with Basics - How do I change pages

phil_J_
New Contributor I
91 Views

I'm sure this is very easy but just can't work it out.....

I have a 4 'page' APP - with a bottom menu bar created in App Framework 3...Obviously as I click a menu item it jumps to that 'page'...fine.

I've got all the hard stuff working, uploading data and pictures, pulling them back etc etc BUT the most basic thing of moving from page to page is stumping me.

On Page 2 I have a button that uploads data - and following this I want to pop up a message then return to Home page.....

Similarly on Page 4 there are settings with a SAVE button which I want to use to go back to Home page...

How do I do this?? Have tried a) from a javascript function and b) from a button within the html of a page....

Have tried Href="#page id" ...doesn't seem to work??

Any help appreciated.

Thanks

 

 

 

 

0 Kudos
3 Replies
Brian_W_Intel
Employee
91 Views

Hey Phil,

AF3 changes pages in a different way than AF2, and right now there's a bug that tries to switch pages using the AF2 selector. While this bug will be fixed in our next release, I have a solution that should work for you now. AF3 switches pages using its loadContent call, so you'll want to load your other pages by having your buttons click event firing the following JS:

$.afui.loadContent("#PAGEID", false, false, 'none');

Of course, with #PAGEID being the ID of the page you want to open.

Let me know if that fixes your issue.

Brian

phil_J_
New Contributor I
91 Views

Thanks Brian - may be me but just tried this by putting the following:  

$.afui.loadContent("#uib_page_2", false, false, 'none');

in the OnSuccess function of a call ....but getting the error

Uncaught TypeError: Cannot read property 'loadContent' of undefined index.html:

Should I have added a library or component?

 

 

Michael_O_2
New Contributor I
91 Views

Add the appframework.min.js file in your 

<head> tag

Reply