This topic is locked

Presenting linked word only if specific url exist

8/25/2005 11:15:45 AM
ASPRunnerPro General questions
orit author

I updated my pages to display the hyperlink (manually since the hyperlink definition in the wizard is not relative and because of another reason..), in the way you instructed me in the past:

Response.Write "<a href=""" & GetData(rs.Fields("HyperLinkField"), "") & """>HyperLinkedWord</a>"


My problem is that the word is always displayed. I have in the database a default path. I want that if the default path is the value of the field - the linked word will not even be displayed - the cell will be empty, and if the value of the field is different from the default path , the word will be displayed and hyperlinked (of course...)
Can you please assist?
Thanks

Sergey Kornilov admin 8/25/2005

Try something like this:

if GetData(rs.Fields("HyperLinkField"), "")<>"Default path value" then

Response.Write "<a href=""" & GetData(rs.Fields("HyperLinkField"), "") & """>HyperLinkedWord</a>"

orit author 8/28/2005

after updating the code, I get:
Error Type:

Microsoft VBScript compilation (0x800A040E)

'loop' without 'do'

/App/REPAIR_SCHEDULE_WEB_list.asp, line 1526
What can be the problem?
Thanks

Sergey Kornilov admin 8/29/2005

Hi,
foregoing snippet cannot cause 'loop' without 'do' error. Make sure you didn't change anything else.

Otherwise please zip and send to support@xlinesoft.com REPAIR_SCHEDULE_WEB_list.asp file for investigation.

orit author 8/30/2005

Sent you the _list file for investigation. (didn't make any change except what you instructed)
Thanks a lot!