Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 12th, 2005, 08:30 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
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
Reply With Quote
  #2 (permalink)  
Old April 12th, 2005, 09:19 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
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
Reply With Quote
  #3 (permalink)  
Old April 12th, 2005, 09:20 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.