Hello,
I’m trying to create a breadcrumb trail and in doing so I dynamically create links to previous pages. I need to be able to insert JavaScript variables into the link. For example:
I have a variable ‘placeName’ with a value ‘FRANCE’ (The value being deduced after some JavaScript function)
I want to amend ‘placeName’ to the end of a URL e.g.: ‘ + ‘placeName’
This then hopefully will be a valid URL and the user can select it as a back link.
I know that + links the two strings, its trying to get the result of this to be placed within the link tag.
So does anyone know how to add JavaScript variables to the end of a URL, example:
<a href = ‘ + placeName’>‘placeName’</a>
tag.
I have looked all over the net and have found nothing to do this
Help!
I’m trying to create a breadcrumb trail and in doing so I dynamically create links to previous pages. I need to be able to insert JavaScript variables into the link. For example:
I have a variable ‘placeName’ with a value ‘FRANCE’ (The value being deduced after some JavaScript function)
I want to amend ‘placeName’ to the end of a URL e.g.: ‘ + ‘placeName’
This then hopefully will be a valid URL and the user can select it as a back link.
I know that + links the two strings, its trying to get the result of this to be placed within the link tag.
So does anyone know how to add JavaScript variables to the end of a URL, example:
<a href = ‘ + placeName’>‘placeName’</a>
tag.
I have looked all over the net and have found nothing to do this
Help!