Next / Previous / Contents / TCC Help System / NM Tech homepage

7.17. navButtons: Add navigational buttons

This function adds the Next chapter and Previous chapter buttons to the given parent. For control names and labels, see Section 7.6.2, “NEXT_CONTROL, Section 7.6.3, “NEXT_LABEL, Section 7.6.4, “PREV_CONTROL, and Section 7.6.5, “PREV_LABEL.

reader.cgi
# - - -   n a v B u t t o n s

def navButtons ( parent ):
    '''Add the next/previous chapter buttons.

      [ parent is an et.Element ->
          parent  +:=  a div element containing two submit
              buttons, one for next chapter, one for previous ]          
    '''
    div  =  et.SubElement ( parent, 'div' )
    nextButton  =  et.SubElement ( div, 'input', type='submit',
        name=NEXT_CONTROL, value=NEXT_LABEL )
    prevButton  =  et.SubElement ( div, 'input', type='submit',
        name=PREV_CONTROL, value=PREV_LABEL )