473,322 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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
Jul 19 '05 #1
4 1510
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" <su**********@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

Jul 19 '05 #2
Maybe you can do like this:

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

/Johnbon

"Suburbiana68" <su**********@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

Jul 19 '05 #3
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:Ok**************@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" <su**********@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


Jul 19 '05 #4
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" <su**********@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:Ok**************@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" <su**********@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



Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Wayne | last post by:
I have a script that uses filesystemobject that reads files from a given path, in my case images. It is running on a server that is 2000 adv svr w/ all current patches. The script prior to some...
3
by: Simon | last post by:
This problem has been driving me mad for months.... Seen a few posts on forums about it but no answers... No mention on MSDN etc. XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
10
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images....
6
by: wattanabi | last post by:
Greetings, I'm attempting to layout a bunch of images in a grid using DIV's instead of a table. I currently have a 3x6 table that I need to convert to css. I've seen various example of a 3 to 4...
2
by: mouseit101 | last post by:
Hi, I'm writing a script that would (hopefully) search google images for whatever, and then return a list of URLs for the image. Right now I have: $dom = new DomDocument(); $url =...
0
by: Frenchie | last post by:
Hi, I have created a very neet menu from an example found on the MSDN library at: http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitembinding.imageurlfield.aspx My...
1
by: Cerebral Believer | last post by:
Hi folks, I am using the following code for mouse over (roll-overs) in my XHTML code. <a onmouseover="document.getElementById('sitemap').src = '../images/buttons/sitemap_mo.jpg';"...
4
toxicpaint
by: toxicpaint | last post by:
Hi, can anyone give me a hand. I'm currently displaying 4 random images at the top of a page. I did this using an array of 35 pictures and then writing them to page. The problem I have is that in...
5
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.