ColdFusion Programming/Hyperlink Problem while adding it dynamically
Expert: Donald Hammond - 6/2/2008
QuestionI am adding hyperlink href dynamically taking it from db. like below:
<a href="#qVerify.sPath#">HOME</a></li>
where qVerify is the query for retrieving the records. But the result output html is like this:
<a href="localhost/sincla/index.cfm#qVerify.sPath#">HOME</a></li>
How do i get rid of the variable names and # coming along with the value.
Please help me. I am newbie to CF, and working in dreamweaver. Thanks in advance
AnswerAloha,
First off, your links should NOT have "localhost" in them. That will tell the browser to look on the local computer of whoever is viewing the page. The link needs to point to a page on the host server in your website.
What you need to do is just look at what is actually in the database. It would appear that #qVerify.sPath# is inside the field along with the rest of it.
So just do this:
<cfoutput query="qVerify">
#sPath#<br>
</cfoutput>
And see what comes out of your query.