what does the "sm_image" from my code? rs(Recordset1.Fields.Item(
Main Topics
Browse All TopicsIn my database, I have about 1 file link for every four rows (of the same Advertiser). The file link is a logo of the advertiser. Right now I get this ugly "x" where the 2-4 other non-images exist. Instead, I would like to replace it with a 1x1 transparent pixel.
I tried putting the following where the repeat region exists but can get it to work.
Here is what Webwoman suggested in a different forum for VBscript. I couldn't get this to work in Javascript
Like this...
<% if rs("sm_image")<>"" then %>
<img src="default_images_path/<
<%else%>
<img src="default_image.gif">
<%end if%>
You'd do the same for the other images. If you don't want to display a default image (I just do 'photo not available' as a graphic), you could display text that says the same thing.
In my case, This is the link and name of the recordset in my cell <img src="../image88/<%=(Record
Please write me an if then that works in javascript asp
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
are you sure that the field ImageURL contains a blank and not a null? because if it is a null you will get an error with the preceding code.. you should try
if (Recordset1.Fields.Item['I
or
if !(isnull(Recordset1.Fields
check the upper and lower cases i don't remember the correct ones..
thx a lot wdeley,
but why the B, if we have helped u solve ur problem right, u should give us the A grade, else u should keep asking us to help u solve ur problem.
plzz check this.
http://www.experts-exchang
u can simmply ask the moderator to raise the grade if u want.
Kanary,
your suggested script helped but it didn't work until epretti added the "null" option. As well, your code had another error "sm_image". Anyway, after a few hours of searching around I found the fixes. Then epretti confirmed the key problem in your script. I reserve the "A" mark for correct the first time around.
thanks for your help. keep up the good work.
w
Business Accounts
Answer for Membership
by: kanaryPosted on 2003-08-08 at 10:12:07ID: 9109658
u may try this:
set1.Field s.Item("Im ageURL").V alue)%>">
<% if (rs("sm_image") !=""){ %>
<img src="../image88/<%=(Record
<%} else {%>
<img src="default_image.gif">
<%}%>
waiting ur reply.