Hi there,
I am having a little difficulty with calling a stored procedure using an html form button. Here is the code I have right now...
HTP.PRINT('<form action=ZWGKERCF.P_confdelete>');
HTP.PRINT('<input type=''submit'' value='' Yes '' onClick=''document.getElementById("mypopup").style.display="none"''>');
HTP.PRINT('</form></div>');
Here is the issue - I need to find a way to pass variables to this stored procedure so it know what data to operate on. This stored procedure will delete data for a specific database record and I must pass three variables to this procedure to make it work.
Lets call them class_number, term, conf These three variables will be passed and the data will be deleted and the person will see a confirmation screen once the delete query has been executed.
So ideally I would want: ZWGKERCF.P_confdelete(class_number, term, conf) and then the stored procedure would handle the rest!
Seems pretty simple but I am not sure how to make this happen... My thoughts were:
Pass the data to this html form (the three fields I need) in hidden variables. Then somehow pass these using POST method to the procedure and read using GET?
Can someone clarify what the best way to do this is? I have a feeling its something small I am missing - but I would really like some expert insight :-)
Thanks so much in advance!
- Jeff