Issue with Visual Basic syntax in a HTML code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JPRW

    #1

    Issue with Visual Basic syntax in a HTML code

    Hello All.

    I am having issues with the visualbasic gramatic for the following scenario:

    I am retrieving information from an Access 2000 Database. The current fields
    are:

    ebay, which is a yes / no, showing as -1 or 0
    ebay_path, which is a memo field with the ebay link to the product
    auctioned.

    within the HTML code, I have the following code:


    ----------------------------------------------------------------------------
    ---
    <%
    if elbadet.Fields. Item("ebay").Va lue = -1 then
    <a href="<%=(elbad et.Fields.Item( "ruta_ebay").Va lue)%>" target="_blank" ><img
    src="images/content/ebay_auctions.g if" width="296" height="43" border="0">
    else
    <img src="images/content/ebay_auctions_i nactive.gif" width="296" height="43"
    border="0">
    end if
    %>
    ----------------------------------------------------------------------------
    ---
    where
    elbadet is the name of the recordset
    ebay is the field having the value
    ruta_ebay is the other field with the path


    Once previewed :is giving me the following error

    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services

    ----------------------------------------------------------------------------
    ----

    Technical Information (for support personnel)

    a.. Error Type:
    Microsoft VBScript compilation (0x800A0400)
    Expected statement
    /lacany/TMP6hxrg14ri3.a sp, line 62
    <a href="<%=(elbad et.Fields.Item( "ruta_ebay").Va lue)


    b.. Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

    c.. Page:
    GET /lacany/TMP6hxrg14ri3.a sp

    d.. Time:
    Monday, July 19, 2004, 11:10:52 PM


    e.. More information:
    Microsoft Support
    --------------------------------------------------------------------------
    In plain english I need the statement to behave something like this
    (pseudocode)

    If the specified filed = -1 then show the active gif image and the link
    else
    show the inactive gif image
    end if statent


    Thanks in advance; any help is highly appreciated.

    Juan Pablo Rojas
    merca-web.com


Working...