mraid.close() doesn't work after submit a form

205 views Asked by At

I have a mraid ad which includes a form for the user to submit his phone number. the form is submitting via a post action to another page on my site.

The problem is, after the user clicks on the submit and sends the form, the new page that renders has no access to the mraid object, so when i later call mraid.close(); , nothing happens.

Is there a clever solution to this?

(i want to be able to close the add also after the form is submitted)

Thanks.

1

There are 1 answers

0
Kesty On

How about using the form.onSubmit function to close the window when the form is submitted?

http://www.w3schools.com/jsref/event_onsubmit.asp