Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 11th, 2004, 04:02 PM
Registered User
 
Join Date: Nov 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Research results

I read a lot of books and I may say I learned a lot, but i do have a problem with the reselts of researches coming from a database. I don't have an image for each record so in the page there are X squares instead of images. Is there a possibility to avoid it?

 
Old November 11th, 2004, 04:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You can create a picture that reads "no image" and use it when an image is not present.

 
Old November 12th, 2004, 05:32 AM
Registered User
 
Join Date: Nov 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by stu9820
 You can create a picture that reads "no image" and use it when an image is not present.

I thought as much but I wanted a confirmation that no other solution was possible. I thank you very much for swiftness.

 
Old November 13th, 2004, 01:03 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;in the page there are X squares instead of images. Is there a possibility to avoid it?

Are these broken images?

;;;I don't have an image for each record

I may have mis understood your post however if not:
If there is no image to show dont write an <img> tag to the page

Wind is your friend
Matt
 
Old November 15th, 2004, 02:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Where do you have the images stored for some of those records that you say. Are they stored in DB or on HDD and you are using physical path in that case?

Use <IMG> tag only if that record has image associated with it. Else don't use <IMG> tag at all. Do this validation just before displaying the image for each record.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old November 15th, 2004, 09:17 AM
Registered User
 
Join Date: Nov 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Images are stored in DB, the point is that I don't know how to validate so that when I see the results of the research there is no X space for the missing images. I am really a beginner and this in only a minor problem I know but I don't like those images with ?not available? on them, better than X but still not the best. Thank you for your suggestions

Quote:
quote:Originally posted by happygv
 Where do you have the images stored for some of those records that you say. Are they stored in DB or on HDD and you are using physical path in that case?

Use <IMG> tag only if that record has image associated with it. Else don't use <IMG> tag at all. Do this validation just before displaying the image for each record.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old November 15th, 2004, 09:43 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I don't tend to store images in DB but I would guess that if the image is not there then there will be null in the field.
So test for null.
Please show your code to extract image from db and we can show how to test for empty field or null.

======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old November 16th, 2004, 03:25 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes, Rodmcleay is right. I too would not prefer to store images in DB. In your case you should check if that is NULL or EMPTY, whichever applicable and show that accordingly.

Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Research about JAVA Cute Designer Java Basics 6 November 8th, 2007 09:02 AM
Edit Query Results in Results Grid druid2112 SQL Server 2005 1 June 28th, 2007 08:49 AM
Research Type Question nadee Oracle 0 March 18th, 2007 11:12 PM
Ch 2 Try It Out Example 2-4. Different results. VictorVictor BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 5 March 27th, 2006 12:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.