Wikipedia Viewer Project Link Problem

I can use the api and I can show them in divs.But my problem is the links I put into a element directing me to the error page.But when I write the links by hand they all work properly.Links are not broken.


This is the page which links direct me.

$("#content").append("<div class='col-md-12'>"+" <h2><a target='_blank' href='"+adrs+"'>"+data.query.search[i].title+"</a>"+"</h2>"+"<p>"+data.query.search[i].snippet+"</p>"+"</div>");

This is the code which I use.

<a target='_blank' href='"+adrs+"'>"+data.query.search[i].title+"</a>"
does not direct to the wikipedia.

**SOLVED:**I saw that the variable I used was not the all link after 2 hours.It was just the end of the link.Such as “example.com/name” I realized that I was using /name instead of the link.Sorry for my oversight.