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 April 12th, 2005, 08:30 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default 'grey out' or 'disable' an image

Is there a way to 'grey out' or 'disable' an image?

For example i have this code:
Code:
<tr>
<td>
Status:
</td>
<td>
<img src="picco.jpeg">
</td>
</tr>
How can i 'grey-out' the image picco.jpeg, or have it appear to be 'disabled' like the text???

Picco




www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old April 12th, 2005, 09:19 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

Also discussed @:

http://www.codingforums.com/showthread.php?t=56782

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
 
Old April 12th, 2005, 09:20 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

yes i do want it to only occur under a condition, but i would kind of need it to be done with HTML, Javascript, ASP or whatever.

I think it can be done with ASP.NET, but I have yet to see it be done anywhere on the WWW with Classic ASP.

Thanks for all your help guys, have you got any other ideas?

Can it be done with javascript?

I found this page, but dont really know what the guy is trying to say:

---------------------------------------------

> <div id=s1 disabled>
> <button onclick="alert('1')">click me</button>
> <button onclick="alert('2')">click me</button>
> <button onclick="alert('3')">click me</button>
> </div>
>
> When I open this code in IE6 the buttons indeed appear grayed out
> (disabled), but surprisingly - they do respond to clicks, despite
> MSDN's explicit declaration...

That won't work in any browser other than IE. It's also invalid HTML.

> Does anybody know how can I still control the buttons state or
> enable/disable their mouse events in one command?

Use your original HTML and:

if( !document.getElementById ) {
if( document.all ) {
document.getElementById = function( id ) {
return document.all[ id ];
}
} else {
document.getElementById = function() {
return null;
}
}
}
function enableGroup( prefix, num, bool ) {
bool = bool || true;
for( var i = 1, e; i <= num; ++i ) {
e = document.getElementById( prefix + num );
if( e ) e.disabled = !bool;
}
}

calling the function

enableGroup( 'b', 3 )
or
enableGroup( 'b', 3, true )

to enable b1 through b3 and

enableGroup( 'b', 3, false )

to disable b1 through b3.

------------------------------------------

I have this setup:


Code:

<% if crm = true then %>
<div id="crm" disabled>
<img src="banner_vr.gif">
</div>
<% end if %>

But, i would like the image disabled or greyed-out if the ASP conditon is met as you mentioned. But as i say there are many images and this image will change every time (like eBay for example).

http://cgi.ebay.com/ws/eBayISAPI.dl...&Category=62136

(the image in left hand corner)

Any help is greatly appreciated!

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Tip: How to 'grey-out' an image crmpicco Javascript How-To 2 April 14th, 2005 08:45 AM
grey out (or disable) a text box crmpicco HTML Code Clinic 2 January 20th, 2005 06:13 PM
grey out (or disable) a text box crmpicco Classic ASP Basics 1 January 20th, 2005 01:48 PM
Disable Right-click for Save Image As... bekim Javascript How-To 5 January 7th, 2005 09:03 PM





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