Question: So I have a some HTML where I am pulling a value from a file and using it for a link, like so:

```
<a href="{{ var('page').value }}">page</a>

```

Now I need a popup to display that page when clicked, using a basic script and a line like this:

```
<a href="page.html" onclick="return popitup('page.html')">page</a>

```

However, I need the popup page value to be pulled from the file as well, so something like this:

```
<a href="{{ var('page').value }}" onclick="return popitup('{{ var('page').value }}')">page</a>

```

But the problem I am having is that the variable does not resolve in the popitup() call, I assume because of the apostrophes basically telling it to take that literally. What could fix this and make it resolve?

This is in conjunction with AngularJS

Answer: 
I'm going to assume that the first snippet you posted. If it works, great; this answer should work for you. If not, well, I don't know - more information would be needed, like a fiddle illustrating the problem or know what templating engine you're using. 

Since the function "popitup" needs the save value as the href of the link, why not pass in the href of the link?

```
<a href="{{ var('page').value }}" onclick="return popitup(this.href)">page</a>

```
ngClick is the way to deal with that kind of things if you are using Angular.

This was anserwed here, and if you really need the onclick attribute: [how to pass angular js variable inside onclick function as parameter](https://stackoverflow.com/questions/32377632/how-to-pass-angular-js-variable-inside-onclick-function-as-parameter)