Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
Thread Tools Display Modes
  #1 (permalink)  
Old August 23rd, 2004, 10:31 AM
Authorized User
Join Date: Apr 2004
Location: ny, ny, Yemen.
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?

  #2 (permalink)  
Old August 23rd, 2004, 11:28 AM
Friend of Wrox
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts


You may be able to use javascript:


  #3 (permalink)  
Old August 23rd, 2004, 06:08 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41

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.


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)

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
  #4 (permalink)  
Old August 23rd, 2004, 06:54 PM
Authorized User
Join Date: Apr 2004
Location: ny, ny, Yemen.
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts

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


Thread Tools
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
Comparing and highlighting text !!!!!!!!!! srkarthik_82 .NET Framework 2.0 2 December 18th, 2007 06: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 08:08 AM

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

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