1

I'm inquiring as to how to send text with a URL so it can be used in the destination. I've searched everywhere, I'm not sure my terminology is correct so I can't find much.

I want to append a user's name to a URL, e. g. www.yourwebsite.com/post?name=John.

When they click on the URL and the data is passed, is there a way I can pass the data into a dynamic HTML element?

E. g. <h1>Hello, [name]</h1> resulting in <h1>Hello, John</h1>

Thanks heaps.

Armali
  • 18,255
  • 14
  • 57
  • 171
  • Where are you getting the data from? That would help us narrow it down a bit more! – Matt Maclennan Sep 11 '15 at 07:56
  • 1
    maybe look at this http://stackoverflow.com/questions/5448545/how-to-retrieve-get-parameters-from-javascript – Sergej Sep 11 '15 at 07:58
  • or this http://stackoverflow.com/questions/19491336/get-url-parameter-jquery – Sergej Sep 11 '15 at 08:00
  • I think what you need is a templating system: http://garann.github.io/template-chooser/. Other wise the terminlogy you are looking for is probably string interpolation: http://stackoverflow.com/questions/1408289/how-can-i-do-string-interpolation-in-javascript – silkAdmin Sep 11 '15 at 08:01
  • Thanks again for your help. I was going to append a Mailchimp Merge tag from an email: www.yourwebsite.compost?name=*|FNAME|* Which doesn't give me a heap of functionality. I would then decide on how to build my page to pick up the *|FNAME|* and dynamically change elements on the page. – Adam Hobson Sep 11 '15 at 08:19

0 Answers0