Instead of using a bothersome pop-up, how about implementing a checkbox that users must mark in order to proceed? If the checkbox is left unchecked, the form will either not be submitted or an error message can be displayed, notifying the user that they did not agree to the terms.
If there isn't a specific need for JavaScript, it might be best to avoid using it for this purpose, especially since users have the ability to disable JavaScript.
For instance (utilizing JavaScript to prevent form submission):
<form name="offerForm" action="/offer" method="post" onsubmit="return this.elements['agreeTerms'].checked;">
<!-- the rest of your form goes here -->
<input type="checkbox" name="agreeTerms" id="agreeTerms" value="1" /> <label for="agreeTerms">I agree to the terms.</label><br />
<input type="submit" value="Submit Offer Form" />
</form>
In terms of server-side operations, assuming you have a relational database setup in the background. Imagine having tables for users, offers, and a bridge table linking users to accepted offers.
Following the above example, a new record would only be added to the bridge table if the "agreeTerms" checkbox returns a value of "1". If the checkbox remains unchecked, no value will be assigned to "agreeTerms".
If you provide more details about your situation (such as the server-side language used, basic database schema, etc.) in your question, I can offer more specific guidance.