after I click the submit button I have workflow to gain the URL based on my inputs fields to http post to my SMS gateway.
So the user can fill in a few fields to define parameters for your sms API.
My problem I don't want to user to manually execute the SMS http post URL in order to send the SMS.
If I understand correctly, the user will always trigger the sms to be sent, doesn't matter if you wait 5 seconds or not. That doesn't provide any security for the real problem you have here.
Hiding or disabling the form would have the same effect.
I guess you want to throttle the submission.
then execute/call the URL in the background or in quote mode where the user does not see its opening the browser or URL
Why not ajax?
What you describe is possible. But there are maybe better ways to do what you want, instead of relying on a timer to finish some page loads/redirects. Im not sure what the limits of SharePoint are, but this is not the most reliable method.
Please elaborate on the problems and what you have to solve it. Is there special session data to be sent, so that post submission via ajax is not easily possible? Can you reconstruct the data to send in the background? What url is that, that the user has to enter? Can you validate it?
Please let me know.