Coast Line
asked on
stuck @ the links CF
I have the following code and i am stuck at the links Part, Just give me an idea what i am missing
<cfset lstAllLinks = ValueList(ads.label,' | ')>
<p><a href="my.cfm?file=all&c=#r eplace(lst AllLinks,' ','_','ALL')#">#lstAllLink s#</a>
now it creates the list separated by pipe symbol but links are not made correctly, i know this is i am big something here, just need idea
<cfset lstAllLinks = ValueList(ads.label,' | ')>
<p><a href="my.cfm?file=all&c=#r
now it creates the list separated by pipe symbol but links are not made correctly, i know this is i am big something here, just need idea
What is the value of ads.label? I would need to see more code .
Yea, we need to see the value of ads.label and see what it looks like after the code... and tell us what you want it to look like (specfically what is wrong?)
As a general guess, since this is going onto a link, you may need to wrap the code in URLencodedFormat so invalid characters don't message up your link
<a href="my.cfm?file=all&c=#U RLencloded Format(rep lace(lstAl lLinks,' ','_','ALL'))#">#lstAllLin ks#</a>
As a general guess, since this is going onto a link, you may need to wrap the code in URLencodedFormat so invalid characters don't message up your link
<a href="my.cfm?file=all&c=#U
ASKER
ads.label comes as like
c=mail_me
c=contact_us
so links are formed as:
<a href="my.cfm?file=all&c=ma il_me | contact_us">Mail Me | Contact Us</a>
obvious i want to split the href for the two links differently
c=mail_me
c=contact_us
so links are formed as:
<a href="my.cfm?file=all&c=ma
obvious i want to split the href for the two links differently
It's not obvious. What do you want the result to look like??
<a href="my.cfm?file=all&c=ma il_me | contact_us">Mail Me | Contact Us</a>
or...
<a href="my.cfm?file=all&c=ma il_me|cont act_us">Ma il Me | Contact Us</a>
<a href="my.cfm?file=all&c=#r eplace(lst AllLinks, ' ', '', 'ALL')#">#lstAllLinks#</a>
or ..
<a href="my.cfm?file=all&c=ma il_me">Mai l Me</a>
<a href="my.cfm?file=all&c=co ntact_us"> Contact Us</a>
<a href="my.cfm?file=all&c=ma
or...
<a href="my.cfm?file=all&c=ma
<a href="my.cfm?file=all&c=#r
or ..
<a href="my.cfm?file=all&c=ma
<a href="my.cfm?file=all&c=co
ASKER
>> <a href="my.cfm?file=all&c=ma il_me">Mai l Me</a>
<a href="my.cfm?file=all&c=co ntact_us"> Contact Us</a>
like above
<a href="my.cfm?file=all&c=co
like above
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
if "ads" is a query, I don't see the need to create a value list and then loop the list, just loop the query!
<p>
<cfloop query="ads">
<a href="my.cfm?file=all&c=#r eplace(ads .label,' ','_','ALL')#">#ads.label# </a>
<cfif ads.currentRow lt ads.recordCount> | </cfif>
</cfloop>
</p>
<p>
<cfloop query="ads">
<a href="my.cfm?file=all&c=#r
<cfif ads.currentRow lt ads.recordCount> | </cfif>
</cfloop>
</p>
ASKER
but with this
<cfif ads.currentRow lt ads.recordCount> | </cfif>
i am still the the Pipe symbol after thr last record
<cfif ads.currentRow lt ads.recordCount> | </cfif>
i am still the the Pipe symbol after thr last record
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks