Skip to content

Commit

Permalink
Add Page refresh after form submission
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonpaul committed Nov 1, 2023
1 parent bfb9f25 commit 5c682ed
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions static/js/main-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $(document).ready(function () {
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
)
}
var uid = uuidv4();
const date = new Date();
const todayDate = date.toLocaleString('en-US', {
timeZone: 'America/New_York',
Expand All @@ -19,9 +20,9 @@ $(document).ready(function () {

});

var uid = uuidv4();

$('#contact-submit-live').click(function (e) {
e.preventDefault();
e.preventDefault();
var first_name = $('#name').val();
var email = $('#email').val();
var subject = $('#subject').val();
Expand Down Expand Up @@ -74,7 +75,8 @@ $('#contact-submit-live').click(function (e) {
var NovuBaseURL = $('#_novbaseurl').val();
var regformToEmail = $('#_regformsupportemail').val();
var inviteurl = NovuBaseURL+'token='+encodedValues;
var registerFormData = {

var registerFormData = {
"name": "ubh-notify-user-registration",
"to": {
"subscriberId": regformToEmail,
Expand Down Expand Up @@ -160,6 +162,8 @@ $.ajax(settings).done(function(response) {
$('.loader-form').hide();
var $success = $('#success'); // get the reference of the div
$success.show().html('We appreciate your registration with Unblock Health.');
setInterval('location.reload()', 800);
$success.show().html('');
}
});
});
Expand Down

0 comments on commit 5c682ed

Please sign in to comment.