-1

I have a contact form which when the button to submit is clicked redirects to my homepage, when my homepage loads I want a javascript alert to come up saying 'Thanks for contacting us'

Thank you.

Alfie
  • 1
  • put a query parameter in the url, open that new url. on the page itself check for the query parameter and do the alert if it's there. – Marc B Jun 10 '16 at 18:47
  • 1
    What exactly are you asking for? Would you like someone to write the javascript for your case? Or have you tried and run into a problem? To help, we would need to see an example of what you have tried, with a specific question about what you're having trouble with. – Tim Copenhaver Jun 10 '16 at 18:47

1 Answers1

0

Attach a parameter to your URL (www.example.com/?formSubmit=true).

With JS, look for the formSubmit=true. If you see it, create an alert.

To set up the javascript portion, check out this previous question:

How to retrieve GET parameters from javascript?

Community
  • 1
  • 1
trismi
  • 760
  • 6
  • 16