NetTalk Central

Author Topic: Which embed to put another button next to change insert delete on browse  (Read 2551 times)

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
I've been using a kludge to make buttons work next to the Insert, delete, et al buttons. I've been hacking together code to make "View" and "Select" buttons work for other things, so I figured I'd ask if anyone has tips on making other buttons.

Basically I want a Copy button to appear right next to Insert, then have it go to the form and prime fields with values from the highlighted record. Any suggestions on where to put the button code, both to display a new button and to jump to the new form?
Mike Grigsby
Credify Systems
Central Oregon, USA

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Hi Mike,

I noticed no one answered this... so just in case you still were looking i'll add my bit in here.

AT "AfterUpdateButtonsBottom" EMBED

If loc:found
  packet = clip(packet) & p_web.CreateButton('submit','change_btn','Change to Listing','XLargeButton',loc:FormName,'TaskLost2Listing','','','',-1,'images/listing.png',16,16,'','')
  do SendPacket
End

loc:found means there are some rows in the browse

Bruce has some nice methods for creating buttons (should have seen the crap i wrote before i found these!).

Look up the CreateButton in Bruces code for the parameters, in my example "TaskLost2Listing" is a page that does some processing. XLargeButton is an extra CSS style i use for really big buttons

Your unique key value for the row highlighted will be available in the POST data in the new procedure.


Regards
Bill