Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 15 JUL 2020 11:55:22AM bshumsky wrote:

Helpful Notes will be a series (?) of postings derived from emailed questions and answers that may be helpful to others

I see in JQuery Mobile examples they use a "Navbar" in the footer instead of buttons like I'm using. I prefer a Navbar since the touch area is larger than the size of the buttons.

Can this be done with O4W Mobile?

Yes, you can use a navbar (either in the header or the footer). Here's some code that illustrates how to do it:

            o4wsectionstart("MyNavbarSection", o4wmobileoptions("navbar" ))
  • Items in a navbar are "list" items
            O4WLISTSTART("0", "MyNavbarItems" )
  • make a list item for each navbar element
             o4wlistitem()
            o4wlink("Option 1", O4W_LINKTYPE_NORMAL$, "https://www.revelation.com" )
            o4wlistitem()
           o4wlink("Option 2", O4W_LINKTYPE_NORMAL$, "https://www.google.com" )
  • etc. - repeat as needed for the other navbar elements
            o4wlistend("MyNavbarItems" )
            o4wsectionend("MyNavbarSection" )

The navbar will always be horizontal, and it is sized according to how many options you specify - 1 will take the whole bar, 2 will split it 50/50, etc.

If you want to put the navbar in the footer, as a "fixed" footer, then you would surround the navbar section with a footer section:

o4wsectionstart("MyNavbarFooter", o4wmobileoptions("footer","b" ) : O4WDataStyle("", "data-position", "fixed" ))

o4wsectionstart("MyNavbarSection", o4wmobileoptions("navbar","b" ))

       ... do all of the ListItem stuff ...

o4wsectionend("MyNavbarSection" )

o4wsectionend("MyNavbarFooter" )

- Bryan Shumsky

Revelation Software, Inc.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/9304dc4a287516469d78527d234dee51.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1