NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: mmelby on October 06, 2023, 12:54:27 PM
-
I have not done this before so I am probably missing something easy. I added a button to my menu. It calls a regular Clarion Source Procedure. I have 3 clarion statements in the Process Code embed.
I do not get any compile errors but when I click the button I get a "The page cannot be found" error. I am not trying to display any HTML. There is no HTML in the procedure. I don't want to display anything. I just want the code to run.
I have created an example app using the wizard that shows this behavior. It has the App, Dct, and a test file. The button says "Clear File Records".
I didn't find anything helpful when I searched. Any help is appreciated.
Regards,
Mike
-
Well, your menu and javascript are in the browser. Your ClearFile procedure is in the server. Your menu item is trying to make an AJAX call to the server. The server is confused.
Attached may give you some ideas. Not saying it's the best way, but it's an approach.
changed the action on your menu item.
added 5 lines of code to the PageHeaderTag procedure
added your ClearFile procedure to the Calls list for PageHeaderTag
and I changed ClearFile to use regular Open and Close statements, rather than file manager. Emptying a file requires exclusive access. In a real-world multi-user environment you'd need to do something more robust to make sure that any other people who had that file open were dealt with.
HTH,
Jane
-
Thank you! I will check it out.