Solving The Issue Of Submitting Premiseid And Applicationid To The Database With Ajax Calls