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 October 27th, 2004, 05:08 AM
Registered User
 
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to knihar
Default hOW COULD ONE ADD A IMAGETO A LIST CONTROL

Hello friends

Let me know if one can add an Image to a List control record along with some text.

regards
Nihar :)

 
Old October 27th, 2004, 06:29 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Hi Nihar,

I don't think there are any direct methods.

But the following indirect method will work. Please not that this is only a sample code and you need to develop it to suit your particular situation.

------------------------------------------------------------------------------
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
    <title>list box with images</title>
    <script language="JavaScript" type="text/javascript">
    <!--
        function func_hide_show_image_list()
        {
            var obj_image_list=document.getElementById("imagelist");
            if(obj_image_list.style.display=="block")
            {
                obj_image_list.style.display="none";
            }
            else
            {
                obj_image_list.style.display="block";
            }
        }
    //-->
    </script>
</head>

<body>
<div style="display:block" onClick="func_hide_show_image_list();">select image from below</div>
<div id="imagelist" style="display:none"><img src="images/test.gif" alt="" longdesc="" /></div>
</body>
</html>
--------------------------------------------------------------------------
You have to put an image by name test.gif in a sub-folder "images" under the folder where the above html file resides. Then on clicking the text "select image from below", you can see the image list opensout. Clicking it once again will fold it back.

Best wishes

Madhu





Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding to a class library using the List..Add BigJay86 C# 2 June 23rd, 2006 04:08 PM
Add Mailing List Problem USADarts BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 August 11th, 2004 10:19 PM
User can add Item in JComboBox list ?? bikash Java GUI 2 March 20th, 2004 05:43 PM
add multiple list to textbox stoneman Access 1 November 3rd, 2003 01:10 PM





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