Button onclick open a section

Hi
I am trying to add a button to a Doctype where onclicking the button it has to open a section within the doctype. What is the syntax?
Thanks

e.g in web console for sales order form,
cur_frm.get_field(‘contact_info’).collapse()

can fold and unfold the address and contact section