Forum Discussion

Ya_akovGoldberg's avatar
Ya_akovGoldberg
Qrew Trainee
6 years ago

Code Page Run When New Form Is Saved

I have a code page that works properly. I am using the Image On Load system to get the code page to run; however, I don't want the code to run on load. I want it to only run when the user hits "Submit".

I have tried to use the "onclick" method of the HTML element, but the save code from QuickBase runs first. The optimal solution would be to have my code run before the code for QuickBase, but how do I do this?

1 Reply

  • Change the inner HTML so that the submit button is an anchor tag, and use onclick() to run your function.

    example:

    $("#saveButton").html("<a onclick='alert()';>Submit</a>");

    'alert()' can be any function you want.

    note: you will be directly overriding the code quickbase had existing already so you might want to test a bit and make sure you dont break the button.