Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Simple url linking from table

Guest
Nov 17, 2006 Nov 17, 2006
Hi, I am tryinig to link urls that I have entered into my db. This is the code I am using..
<h3> My URL Listing

<cfoutput QUERY="myquery">
<a href="#url#">#url#</a>
</cfoutput>

its giving me
# http://www.aurl.com/#
and is not linking, showing the url in addy bar like this when I click:
http://127.0.0.1/#http://www.aurl.com# when I click.

I am using CFsrvr 5
Can somone guide me in the right direction?
Thank you
TOPICS
Getting started
850
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 17, 2006 Nov 17, 2006
Check your data as it actually is in the database, I suspect you have
the pound signs in the database.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 17, 2006 Nov 17, 2006
I wish that were the case, butthe links look like this in the table...

http://www.adobe.com
http://www.google.com
http://www.proprofs.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 17, 2006 Nov 17, 2006
Friedly Bump 😉
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 19, 2006 Nov 19, 2006
Well, its been a couple of days, can no one help a noob?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 19, 2006 Nov 19, 2006
cfmnehwB,

I don't know if its the problem but URL is a reserved word in CF. Try changing the query column name and see if it makes a difference..

<!--- in query --->
SELECT URL as LinkURL
FROM MyTable


<cfoutput QUERY="myquery">
<a href="#LinkURL#">#LinkURL#</a>
</cfoutput>


http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_17484
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 20, 2006 Nov 20, 2006
You know, I tried this. It still is not linking correctly and I also just put the #url# in to list the urls, and still it put the # sign. I went and looked into my database and guess what, it PUT the pound signs in there. I am using Micrsoft Access and you know what, I just dont know how to use it. I am trying to teach myself coldfusion, and have tried off and on, I get discouraged and then I decide to try again, so I guess I better go through the 6 inch thick Sybex book on mastering coldfusion before I post.. Sorry to waste your time What IS the best way for a person like me to learn this language? I have the Sybex book, but it also seems like it is for an advanced user. I duno, any leads would be appreciated.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 20, 2006 Nov 20, 2006
Yes the CF web application construction kit is a good book to get started with. Especially if you're new to databases. The initial chapters help you get your feet wet without drowning you in information.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 20, 2006 Nov 20, 2006
I always recommend the Cold Fusion web application construction kit by Ben Forta. It is written to take you from simple stuff to advanced in an easy to read, easy to unserstand manner.

M
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 21, 2006 Nov 21, 2006
Here you go, from one noob to another:

In my access db links are like this: www.mosescone.com
in CF: <a href=" http://#Link#">#Link#</a>

Give it a try.

Good luck!

Rick
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2006 Nov 21, 2006
Wow, it worked! But still in the page the link is not formatted right, I snapped a couple of screenshots. Have a look. Thanks alot webspinner!

http://law-corp.zoomshare.com/files/code_shot_dw.gif
http://law-corp.zoomshare.com/files/code_shot.gif
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 21, 2006 Nov 21, 2006
LATEST
fwiw, could you maybe change the datatype of the column from URL to just a text (char/varchar) datatype? i'm willing to bet it will give you less headaches down the road (and make the app a little more portable).

i don't know why you're still getting the extra # sign, but i'm also willing to bet that changing your datatype to char/varchar will resolve it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources