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

Links question

Guest
Aug 03, 2009 Aug 03, 2009

So I working on what should be a fairly simple problem but it's one of those days where I cant see the forest from the trees. Any help would be appreicated.

I'm trying to create a link from a list of courses using a dynamically created value from the database.

                     <table><cfoutput query="jqpm">
                            <tr>
                                <td><img src="../../images/bullett.jpg" alt="bullet" /></td>
                                <td class="subtexttitle"><a href="#courseDeeplink#">#courseName#</a></td>
                            </tr></cfoutput>
                        </table>  

The courseName values load fine but when I click the link to go to the courseDeeplink value, it does nothing.  The values for the links in the db look like this:

                    https://cdsds.onsaba.net/Saba/Web/cdsds/goto/OfferingDetails?offeringId=dowbt0000054303479341

So when I roll over the #courseName#  list the following value appears below in the status bar of the browser:

                    http://mywebsite.com/index.cfm#https://cdsds.onsaba.net/Saba/Web/cdsds/goto/OfferingDetails?offering...

Couple other things I should mention.  The values were uploaded from an Access DB (data type hyperlink) to SQL Server DB (data type nvarchar).  Not sure if this has any impact.  Just need another set of eyes.  Any insights would be appreciated.

Thanks,

Dee

828
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
Advocate ,
Aug 03, 2009 Aug 03, 2009

Dee,

Either you need to change your field from "hyperlink" datatype to either "text" (or) "memo".

(Or) if you can't,

You can try this UDF,

http://www.cflib.org/udf/AccessLinkClean

HTH

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
Aug 05, 2009 Aug 05, 2009

You might have a leading carriage return or line feed or tab with the data that is stored in the DB, and some browser may not like the extra space in the href tag.

The CF trim() function may handle this.  I've exprienced issues where it does not, and have used a reReplace() with a regular expression \n\t\r to replace with "".

off the top of my head

#reReplace(courseDeeplink, "[]\n\t\r", "", "ALL")#  - that is line feeds, tabs and carriage returns.

if there are spaces in courseDeeplink, do this to the variable first

replace(courseDeeplink, " ", "%20", "ALL")

This will give the proper encoding for the url in case there are spaces in the url (which is a bad practice, but might be the case).

Sorry if my parameters are not in exact orderr, shooting from the hip.

Byron Mann

mannb@hostmysite.com

byronosity@gmail.com

Software Architect

hosting.com | hostmysite.com

http://www.hostmysite.com/?utm_source=bb

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
Aug 07, 2009 Aug 07, 2009
LATEST

OfferingDetails?offeringId=dowbt0000054303479341


Is your link missing a dot cfm reference ie should it be offeringdetails.cfm?offeringId=

On the other hand, it could be that offeringdetails is a directory and you have mapped your default file correctly in that directory. In which case you can ignore my reply!

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