Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components 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 August 23rd, 2004, 10:31 AM
Authorized User
 
Join Date: Apr 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Highlighting in a datalist

i am trying to do the same highlighting effect done on this victoria secret website. I am using a datalist.any suggestions?
http://www2.victoriassecret.com/coll...ZZZ&rfnbr=1204



rrr
__________________
rrr
 
Old August 23rd, 2004, 11:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

You may be able to use javascript:

http://imar.spaanjaars.com/ViewConte...=1&CATEGORY=42

Brian
 
Old August 23rd, 2004, 06:08 PM
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

Yes a nice effect, if you:

1. go to the page, view the source code
2. search for one of the image names eg V240734.jpg
3. now have a look at the function in the <td> you will find:
  a. onMouseOver="pink('cell1')" onMouseOut="white('cell1')"

This function is what does the color change and is sitting in the head of the document:

function pink(id){
    if (document.layers || document.getElementById) {
        var st=document.getElementById(id);
        st.style.borderColor= "FF93BF";
    }
    }

    function white(id){
    if (document.layers || document.getElementById) {
        var st=document.getElementById(id);
        st.style.borderColor= "white";
    }
    }

Fairly simple stuff, all the code you need for this is actually in this post.

OR

You could also do it with a simple image swap on some event (inside the <img> tag) The method used on the VS web site is more efficient due to there not being additional images needed (dont forget to pre load the 'onMouseOver' Images)

NOTE:
If you want it to be completely cross browser and version compatible use the later version, I dont believe the JS function will work in browsers with a different Document Object Model to IE. Execuse me if this is slighlty incorrect but I think there are a few if else's missing from the function at a glance, I'm not a JS guy


Wind is your friend
Matt
 
Old August 23rd, 2004, 06:54 PM
Authorized User
 
Join Date: Apr 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

THANKS GUYS!! it didnt even occur to me to look the javascript direction. i was thinking it was something that i needed to set in the datalist. Thanks again

rrr





Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing and highlighting text !!!!!!!!!! srkarthik_82 .NET Framework 2.0 2 December 18th, 2007 07:28 AM
Highlighting a textbox in a formview amatytfc ASP.NET 2.0 Basics 0 October 12th, 2007 03:13 PM
I have another highlighting problem. gilgalbiblewheel Classic ASP Databases 2 July 20th, 2005 02:02 PM
highlighting the search keyword(s) Adam H-W Classic ASP Basics 2 February 10th, 2004 09:08 AM





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