-7

I have just created a Newsletter Form on my website, via an external provider called "Benchmark" - to save time because I am not a professional programmer, so I only know HTML and CSS coding so far.

Their service generates an automatic thank you page that I am free to use, but when you click "back to the website", it automatically goes back to the cached page, which means that all the data inserted into the Newsletter form (email and name) is still there.

I think this gives the customers a lot of uncertainty about whether their data has gone through (and Benchmark replied that I had to make my own "Thank You" page if I want this function), so I would like to create my own page with a link (using HTML-code), which will automatically refresh the page that is linked back to - so that the customer comes back to the page with an empty Newsletter Form.

I have seen some similar questions with answers in the Forum, but as far as I could see, they use other programming languages that I don't know how to implement, so if anybody knows of a method of how to do this with HTML (and CSS, if needed), I would be very grateful. Thank you in advance!

Azita
  • 1
  • 1

1 Answers1

0

If I understand correctly, you want a page that will redirect to your newsletter form (with the fields empty). You have a couple of options: use a bit of javascript, or use an HTML meta tag. For both of these you'll need a new page. Since you want a pure HTML answer, I'll show you the meta tag version first.

For the meta tag, you'll simply want to put the following code in the head section of your page:

<meta http-equiv="refresh" content="0; url=http://example.com/" />

The javascript solution would also go in the head section as a <script> tag:

<script type="text/javascript">window.location.href = "http://example.com/";</script>

In either one, just replace http://example.com/ with the address of your newsletter form and you should be good to go.

There's also this question that you can look at if you want to learn more.

Matthew Schlachter
  • 3,250
  • 1
  • 12
  • 26
  • I will try the HTML meta tag for my page then (but I am assuming with the extra " in front of "http://"?). And just to make sure that I have understood you correctly: I add the meta tag on the web page that contains the link? Thank you so much for your help so far :-)! – Azita Feb 27 '18 at 19:07
  • @Azita Yep, the meta tag goes on the page that contains the link :) The quotation marks belong to the `content` attribute of the `meta` tag and not to the `url=` part, so no extra `"` infront of the `http://`, just like `content="0; url=http://example.com/"` :) – Matthew Schlachter Feb 27 '18 at 19:25