Professional Web Applications Themes

ASP Question - Images ... - ASP

I am designing a website that is based from an Access database; in the database I have a table called "Categories" with fields called "Category" and "CategoryPic". On my index page I have coding to get the list of Categories, called rsCategories. What I am attempting to do is create ASP code that would retrieve an associated GIF file from my images folder when a particular "Category" is chosen (ie. if you choose CategoryA from the recordset, then CategoryA.gif would appear on the page, CategoryB would retrieve CategoryB.gif, etc.). Can anyone kindly assist me in completing this one piece of ...

  1. #1

    Default ASP Question - Images ...

    I am designing a website that is based from an Access database; in the
    database I have a table called "Categories" with fields called "Category"
    and "CategoryPic".
    On my index page I have coding to get the list of Categories, called
    rsCategories. What I am attempting to do is create ASP code that would
    retrieve an associated GIF file from my images folder when a particular
    "Category" is chosen (ie. if you choose CategoryA from the recordset, then
    CategoryA.gif would appear on the page, CategoryB would retrieve
    CategoryB.gif, etc.).

    Can anyone kindly assist me in completing this one piece of code that is
    driving me nuts?

    Thanks in advance,
    Craig


    Suburbiana68 Guest

  2. #2

    Default Re: ASP Question - Images ...

    show us what you have so far,
    but generally it is this:

    <img src = "<%= rsCategories("CategoryPic") %>.gif" border=0 >

    Notice that I beat "Ray at Home" at helping you out here.


    "Suburbiana68" <suburbiana68hotmail.com> wrote in message
    news:oiolb.143481$6C4.9369pd7tw1no...
    > I am designing a website that is based from an Access database; in the
    > database I have a table called "Categories" with fields called "Category"
    > and "CategoryPic".
    > On my index page I have coding to get the list of Categories, called
    > rsCategories. What I am attempting to do is create ASP code that would
    > retrieve an associated GIF file from my images folder when a particular
    > "Category" is chosen (ie. if you choose CategoryA from the recordset, then
    > CategoryA.gif would appear on the page, CategoryB would retrieve
    > CategoryB.gif, etc.).
    >
    > Can anyone kindly assist me in completing this one piece of code that is
    > driving me nuts?
    >
    > Thanks in advance,
    > Craig
    >
    >

    Jeff Clark Guest

  3. #3

    Default Re: ASP Question - Images ...

    Maybe you can do like this:

    response.write "<img src='../imagefolder/"& rsCategories("Category") &".gif'>"



    /Johnbon

    "Suburbiana68" <suburbiana68hotmail.com> wrote in message news:<oiolb.143481$6C4.9369pd7tw1no>...
    > I am designing a website that is based from an Access database; in the
    > database I have a table called "Categories" with fields called "Category"
    > and "CategoryPic".
    > On my index page I have coding to get the list of Categories, called
    > rsCategories. What I am attempting to do is create ASP code that would
    > retrieve an associated GIF file from my images folder when a particular
    > "Category" is chosen (ie. if you choose CategoryA from the recordset, then
    > CategoryA.gif would appear on the page, CategoryB would retrieve
    > CategoryB.gif, etc.).
    >
    > Can anyone kindly assist me in completing this one piece of code that is
    > driving me nuts?
    >
    > Thanks in advance,
    > Craig
    JohnBon Guest

  4. #4

    Default Re: ASP Question - Images ...

    Thanks Jeff and Jon, still don't seem to get any response, just errors ...
    here is what I originally had:

    <img src="/images/headergifs/<%=rsCategories.FieldValue("CategoryPic",
    Container) %>" alt="Category Pic" width="79" height="79" border="0"
    id="categoryPics" />

    Which delivers the error:
    Error Type:
    Microsoft VBScript runtime (0x800A01A8)
    Object required: ''

    from that line of code.

    I'm still bamboozled, kind of new at the programming side of this ... again
    thanks in advance for any assistance.
    Craig

    "Jeff Clark" <JeffCNO_SPAMreturnventures.com> wrote in message
    news:Okr22gHmDHA.1488TK2MSFTNGP12.phx.gbl...
    > show us what you have so far,
    > but generally it is this:
    >
    > <img src = "<%= rsCategories("CategoryPic") %>.gif" border=0 >
    >
    > Notice that I beat "Ray at Home" at helping you out here.
    >
    >
    > "Suburbiana68" <suburbiana68hotmail.com> wrote in message
    > news:oiolb.143481$6C4.9369pd7tw1no...
    > > I am designing a website that is based from an Access database; in the
    > > database I have a table called "Categories" with fields called
    "Category"
    > > and "CategoryPic".
    > > On my index page I have coding to get the list of Categories, called
    > > rsCategories. What I am attempting to do is create ASP code that would
    > > retrieve an associated GIF file from my images folder when a particular
    > > "Category" is chosen (ie. if you choose CategoryA from the recordset,
    then
    > > CategoryA.gif would appear on the page, CategoryB would retrieve
    > > CategoryB.gif, etc.).
    > >
    > > Can anyone kindly assist me in completing this one piece of code that is
    > > driving me nuts?
    > >
    > > Thanks in advance,
    > > Craig
    > >
    > >
    >
    >

    Suburbiana68 Guest

  5. #5

    Default Re: ASP Question - Images ...

    oh well did you do a set statement for the rsCategories?

    set rsCategories = server.createobject("adodb.recordset")

    also, maybe you have no records returned. did you test for that?



    "Suburbiana68" <suburbiana68hotmail.com> wrote in message
    news:8evlb.147467$pl3.61154pd7tw3no...
    > Thanks Jeff and Jon, still don't seem to get any response, just errors ...
    > here is what I originally had:
    >
    > <img src="/images/headergifs/<%=rsCategories.FieldValue("CategoryPic",
    > Container) %>" alt="Category Pic" width="79" height="79" border="0"
    > id="categoryPics" />
    >
    > Which delivers the error:
    > Error Type:
    > Microsoft VBScript runtime (0x800A01A8)
    > Object required: ''
    >
    > from that line of code.
    >
    > I'm still bamboozled, kind of new at the programming side of this ...
    again
    > thanks in advance for any assistance.
    > Craig
    >
    > "Jeff Clark" <JeffCNO_SPAMreturnventures.com> wrote in message
    > news:Okr22gHmDHA.1488TK2MSFTNGP12.phx.gbl...
    > > show us what you have so far,
    > > but generally it is this:
    > >
    > > <img src = "<%= rsCategories("CategoryPic") %>.gif" border=0 >
    > >
    > > Notice that I beat "Ray at Home" at helping you out here.
    > >
    > >
    > > "Suburbiana68" <suburbiana68hotmail.com> wrote in message
    > > news:oiolb.143481$6C4.9369pd7tw1no...
    > > > I am designing a website that is based from an Access database; in the
    > > > database I have a table called "Categories" with fields called
    > "Category"
    > > > and "CategoryPic".
    > > > On my index page I have coding to get the list of Categories, called
    > > > rsCategories. What I am attempting to do is create ASP code that
    would
    > > > retrieve an associated GIF file from my images folder when a
    particular
    > > > "Category" is chosen (ie. if you choose CategoryA from the recordset,
    > then
    > > > CategoryA.gif would appear on the page, CategoryB would retrieve
    > > > CategoryB.gif, etc.).
    > > >
    > > > Can anyone kindly assist me in completing this one piece of code that
    is
    > > > driving me nuts?
    > > >
    > > > Thanks in advance,
    > > > Craig
    > > >
    > > >
    > >
    > >
    >
    >

    Jeff Clark Guest

Similar Threads

  1. Images appear as question marks
    By jmdesigner in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: April 21st, 10:56 PM
  2. Placed Images in CS : Quick question >>>
    By BKR@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 5
    Last Post: May 29th, 11:12 PM
  3. Tutorial Images Question
    By Buff Charters webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 2
    Last Post: September 6th, 12:35 AM
  4. Images in Filemaker Pro Question
    By i_luv_h8@nospam.hotmail.com in forum FileMaker
    Replies: 3
    Last Post: August 5th, 07:33 AM
  5. PHP Newbie question regarding images
    By BoodieMan in forum PHP Development
    Replies: 0
    Last Post: July 12th, 04:28 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139