bGood
bGood

Reputation: 27

Jquery Modal Window proceeds download request

Hopefully this will be basic but if I create a Jquery click connected to a link that is supposed to download a document. However, before the download is initiated, I want the user to complete a quick profile form.

Suppose a I use a <a href="ProfileFormToBeCompleted.html" class="modal"> in the html page and the following Jquery function.

//SCRIPT TO APPEND 
$('a.modal').click(function() {
    $('#modal_content').html('<p id="modal_image_wrapper"><img src="' + $the_link
        + '"class="modal_placeholder" /></p>');
    showModal();
});

I can get the modal window to display and submit the form but how can I redirect the user to the download once the validation is finished?

Upvotes: 1

Views: 770

Answers (1)

fehays
fehays

Reputation: 3167

If all you need to do is a redirect in javascript, you can do this:

window.location = '/path/to/page';

Upvotes: 1

Related Questions