Why the link won't appear....

Results 1 to 5 of 5

Thread: Why the link won't appear....

  1. #1
    Robert Iveson Guest

    Default Why the link won't appear....

    Hi!<BR>I&#039;m new here and to ASP so please go easy on me!<BR>We have successfully created an e-commerce website, but our client wants a duplicate site but looking different. In effect, it uses the same (working) ASP code to call from a Access2000 database. In the database there is a field that has an entry for a PDF file. If a certain product has an attached PDF file, an icon is displayed, but doesn&#039;t show up if the product DOESN&#039;T have a PDF file. The link to the PDF is generated in the ASP from the field in the database.<BR>Now then, I have arranged all the graphics, moved the apparent connection to the database for the PDF elsewhere in the page, but now no icon appears regardless of the PDF being there or not. I can either have the icon there and no link to the PDF, or no icon whatsoever. An example of the page can be seen at:<BR>http://www.reflex.co.uk/cd/pages/projectors.asp<BR>This shows an icon but the bad link.<BR>The part of ASP code I seem to be having problems with goes thus:<BR><BR>&#060;%If Len(strdescurl) &#062;4 then %&#062;<BR>&#060;a href="../../images/uploads/&#060;%=strdescurl%&#062;"&#062;&#060;img src="../images/pdficon.gif" border="0" alt="Click to download PDF file (File size &#060;%=ShowFileSize("../../images/uploads/" & strdescurl)%&#062;)"&#062;&#060;/a&#062;<BR>&#060;%end if%&#062; <BR><BR>Now I&#039;m not totally clued up on ASP, but I guess that the "If Len" command determines whether the icon is displayed or not. But it seems in this case it just doesn&#039;t.<BR><BR>Any assistance will be gratefully received!!! You can email me at robert@sirencreative.com if people would like to help me privately!<BR><BR>Thanks for your time!<BR>Bert

  2. #2
    Eddie Campbell Guest

    Default RE: Why the link won't appear....

    Hmmm...<BR><BR>What do you get if you do this ?<BR><BR>&#060;%<BR>Response.Write "StrDescUrl=" & StrDescUrl<BR>%&#062; <BR>

  3. #3
    Robert Iveson Guest

    Default RE: Why the link won't appear....

    Unfortunately not. I tried all the Response.write stuff and it still doesn&#039;t acknowledge anything.<BR>Could it have something to do with badly structured Sub and End Sub commands, or does the "Len" command need to be called elsewhere in the script?<BR>I can send you the whole ASP script if you like...<BR><BR>Thanks by the way...

  4. #4
    Join Date
    Dec 1969

    Default the question is..

    are u getting anything when u "response.write" "strdescurl"?<BR>is the length ever going more than "4"?<BR>let us know what the value of strdescurl is and also if u could show the code from where u r getting this value ( whatever the value be) for strdescurl.

  5. #5
    Robert Iveson Guest

    Default RE: the question is..

    Hi.<BR>The response.write stuff seems to act the same as not doing it - no response either way: no icon and no link.<BR>I&#039;m not too clued up of the &#062;4 thing - it&#039;s the same code used as the original shopping cart program, using the same database, using the same products. The pdfs are the whole filenames, so I guess the &#062;4 thing is the ".pdf" part. If this is here, then it will display the pdf icon. I KNOW the pdfs are in the database, but the Len command doesn&#039;t seem to be seeing them.<BR>I will post more source code tomorrow, I am at home now and don&#039;t have access to it. Sorry.<BR><BR>Thanks tho&#039;.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts