ASP Question - Images ...

Ask a Question related to ASP, Design and Development.

  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. Similar Questions and Discussions

    1. Images appear as question marks
      I need help! I just uploaded my first dreamweaver website to yahoo. My images appear as question marks. I've uploaded the images in file manager...
    2. Placed Images in CS : Quick question >>>
      greetings, just a quick question about placed images in illustrator cs. when sizing a placed and linked image, does illustrator recalculate the...
    3. Tutorial Images Question
      Hello, I am new to flash and attempting to do the first tutorial and am currently stuck, any advice would be greatly appreciated. My files have...
    4. Images in Filemaker Pro Question
      Hey, I have filemaker pro 6 trial (got the trial until I'm sure this can be done!) and have make a database that includes images, and here is...
    5. PHP Newbie question regarding images
      I am looking for a way to extract the IPTC info from image files, and then search on the variables in each field, then display the image the...
  3. #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" <suburbiana68@hotmail.com> wrote in message
    news:oiolb.143481$6C4.9369@pd7tw1no...
    > 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

  4. #3

    Default Re: ASP Question - Images ...

    Maybe you can do like this:

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



    /Johnbon

    "Suburbiana68" <suburbiana68@hotmail.com> wrote in message news:<oiolb.143481$6C4.9369@pd7tw1no>...
    > 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

  5. #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" <JeffC@NO_SPAMreturnventures.com> wrote in message
    news:Okr22gHmDHA.1488@TK2MSFTNGP12.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" <suburbiana68@hotmail.com> wrote in message
    > news:oiolb.143481$6C4.9369@pd7tw1no...
    > > 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

  6. #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" <suburbiana68@hotmail.com> wrote in message
    news:8evlb.147467$pl3.61154@pd7tw3no...
    > 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" <JeffC@NO_SPAMreturnventures.com> wrote in message
    > news:Okr22gHmDHA.1488@TK2MSFTNGP12.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" <suburbiana68@hotmail.com> wrote in message
    > > news:oiolb.143481$6C4.9369@pd7tw1no...
    > > > 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

Posting Permissions

  • You may not post new threads
  • You may 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