Formatting Issue with Access 'hyperlink' field type (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


travismp -> Formatting Issue with Access 'hyperlink' field type (11/17/2003 12:02:06)

Hey all. Using Access 2000 with FP 2000.

I have a field in my database that is a full hyperlink field. If I click the link in my database I go directly to the link fine.

I also have an online search that displays the same info, but the online link does not work. When the hyperlink is displayed onscreen there is a # sign in front of and after the hyperlink.

<%=FP_FieldVal(fp_rs,"insurance_click")%>

Am I doing something wrong, or could it be some setting on the server? I do not know what is missing? thanks




Spooky -> RE: Hyperlink Issue (11/17/2003 13:23:22)

The hyperlink field is designed for office use only - not to be viewed via a web application
Perhpas try to construc the URI as so in the SQL string :
SELECT id, field2, '<a href=' & Mid([insurance_click],2,Len([insurance_click])-2) & '>' & [insurance_click] & '</a>' AS YourLink FROM table ;


Youll need to tell the DRW the results contain html

<%=FP_FieldHTML(fp_rs,"YourLink ")%>




travismp -> RE: Hyperlink Issue (11/17/2003 14:02:39)

"Youll need to tell the DRW the results contain html"

How do I do that?




Spooky -> RE: Hyperlink Issue (11/17/2003 14:06:53)

The code I left last should do that :

<%=FP_FieldHTML(fp_rs,"YourLink ")%>

Otherwise, the wysiwyg way of doing it, is to right click on the column value in FP

<<YourLink >> and choose contains html.
Itll change the function to the same as the one above.

Note - ideally for a database web application youll have 2 text fields, one containing the URL, one containing the text to be displayed.
As useful as the "hyperlink' column is in access, its basically a hinderance in asp.




travismp -> RE: Hyperlink Issue (11/17/2003 14:12:20)

I am working with a pre-writtin script someone else set up a long time ago.

If DRW stands for Database Results Wizard (a guess hope I am correct) then there is not one. This was not set up with a Database wizard.

I can send you a copy of the page and you can see the code if it would help Spooky.

I changed my script to look just like the one you provided for that column and no difference.




Spooky -> RE: Hyperlink Issue (11/17/2003 14:23:45)

I would thing it was a DRW if it has the code "<%=FP_FieldVal(fp_rs,"insurance_click")%> " as above?

Anyway - post it here for a look [:)]




travismp -> RE: Hyperlink Issue (11/18/2003 10:23:51)

thanks for the help so far.

I am stumped. I thought it would be easy to figure out, but I have been playing with it for about 4 days now with no luck.




Spooky -> RE: Hyperlink Issue (11/18/2003 12:53:24)

Are you able to post what you have?




travismp -> RE: Hyperlink Issue (11/18/2003 14:37:05)

http://www.nationalcompliance.com/download.htm

I can not upload because of my low status, so i just set up a small zip file online that you can download.

The field is "insurance_click" In the database it works perfect, but online it adds the # sign to the front and back of the results.

Thanks.




Spooky -> RE: Hyperlink Issue (11/18/2003 14:38:44)

Just cut and paste your source code here, use the "code" button when posting


CTRL + V to paste your code





Spooky -> RE: Hyperlink Issue (11/18/2003 14:44:21)

Change this line :

fp_sQry="SELECT * FROM Subform WHERE (ContractorsName LIKE '::ContractorsName::%')"


to :

fp_sQry="SELECT *,  '<a href=' & Mid([insurance_click],2,Len([insurance_click])-2) & '>' & [insurance_click] & '</a>' AS YourLink FROM Subform WHERE (ContractorsName LIKE '::ContractorsName::%')"



Then change :

<%=FP_FieldVal(fp_rs,"insurance_click")%>

to :

<%=FP_FieldHTML(fp_rs,"YourLink")%>




travismp -> RE: Hyperlink Issue (11/18/2003 14:55:44)

Copied your code directly: now the web displays:

Insurance <a href=https://www.nationalcompliance.com/osha/insurance/AAENVIRONMENTAL.tif>#https://www.nationalcompliance.com/osha/insurance/AAENVIRONMENTAL.tif#</a>

where it should only have:

https://www.nationalcompliance.com/osha/insurance/AAENVIRONMENTAL.tif


See....




Spooky -> RE: Hyperlink Issue (11/18/2003 15:27:45)

Try this one :-)

<%=FP_Field(fp_rs,"YourLink")%>




travismp -> RE: Hyperlink Issue (11/18/2003 15:33:48)

This is some crazy stuff. That did it pretty much.... it left the two # signs on the side, but the link does work again....

I am happy with it working so do not worry about the two little # signs, I just put that out there just in case.

You are a smart man. thanks. I will consider this case closed.

What does all of this mean:

<a href=' & Mid([insurance_click],2,Len([insurance_click])-2) & '>' & [insurance_click] & '</a>'

If you have time to teach, if not thianks for all.




Spooky -> RE: Hyperlink Issue (11/18/2003 19:06:37)

Try this one to get rid of the # signs


fp_sQry="SELECT *,  '<a href=' & Mid([insurance_click],2,Len([insurance_click])-2) & '>' & Mid([insurance_click],2,Len([insurance_click])-2) & '</a>' AS YourLink FROM Subform WHERE (ContractorsName LIKE '::ContractorsName::%')"


What its doing, is creating a link from within access as an aliased column value.
Mid() and Len() pull the actual value of "insurance_click" from the database and strip the # from the proprietry Access code.
Youll notice that the <a href> code is normal html.




travismp -> RE: Hyperlink Issue (11/20/2003 14:08:46)

That worked perfect. thanks for everything. I am trying to learn as we do this to cut down on the questions. Thanks again.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
9.179688E-02