NetTalk Central

Author Topic: NetWebForm - how to execute code associated with button  (Read 3034 times)

rjmiller

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • Email
NetWebForm - how to execute code associated with button
« on: September 20, 2012, 10:49:05 AM »
Hi, I have a netwebform on which I would like to have a button that executes some code to delete a certificate file that has previously been uploaded and reset two of the record fields to reflect this.  I have used the server-side code embed to do this and have been successful in deleting the file but I guess I just can't get it into my head how the form/session variables/table fields interact in the netwebform.

I have used winevent to delete the file based on a session variable that contains it's path and a session variable 'ceu:certificate' which holds the file name.  I then need to clear the sting field ceu:certificate which I do by p_web.ssv('ceu:certificate','') and then I need to set the uploads flag to 0 which I do by p_web.ssv('ceu:uploads',0)

This does not work.

Can anyone tell me where I am going wrong?

Thanks.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebForm - how to execute code associated with button
« Reply #1 on: September 20, 2012, 11:57:35 PM »
have you added the two dependent fields (ceu:certificate and ceu:uploads) to the reset list of the parent field (the button?)

cheers
Bruce

rjmiller

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • Email
Re: NetWebForm - how to execute code associated with button
« Reply #2 on: September 21, 2012, 12:04:11 PM »
Yes, I am but seems that there are "strange and interesting" things going on.  If I just add those fields to the form... they don't update that way either although the other fields in the form do... think it is time to punt... delete and start from scratch.

  RJ