473,324 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

how is this done?? (select obj cool effect..)

http://www.msnbc.msn.com/id/16673873/site/newsweek/

pls scroll down, on the left, near the middle, there is a select object
above which it says "Newsweek Business Directory".. how do they get the
alternate background colors on the list?

(I looked @ src code, couldn't find "<select" )

thank you..
Jan 18 '07 #1
3 3018
maya wrote:
http://www.msnbc.msn.com/id/16673873/site/newsweek/

pls scroll down, on the left, near the middle, there is a select object
above which it says "Newsweek Business Directory".. how do they get the
alternate background colors on the list?

(I looked @ src code, couldn't find "<select" )
Firefox's DOM Inspector shows a SELECT in the DOM tree, so some script
must be putting it there.
Jan 18 '07 #2
Harlan Messinger wrote:
maya wrote:
>http://www.msnbc.msn.com/id/16673873/site/newsweek/

pls scroll down, on the left, near the middle, there is a select
object above which it says "Newsweek Business Directory".. how do
they get the alternate background colors on the list?

(I looked @ src code, couldn't find "<select" )

Firefox's DOM Inspector shows a SELECT in the DOM tree, so some script
must be putting it there.
this means what?? is there a way of finding out how it's done? I've
seen it on other websites too..

thank you..

Jan 18 '07 #3
maya wrote:
http://www.msnbc.msn.com/id/16673873/site/newsweek/

pls scroll down, on the left, near the middle, there is a select object
above which it says "Newsweek Business Directory".. how do they get the
alternate background colors on the list?

(I looked @ src code, couldn't find "<select" )

thank you..
maya,

Go to
http://cache.directorym.com/creative...f=1246&group=3
which will display just the list you are interested in (the main page
embeds it in an iframe).

View the source. Search for 'baselist' which is the id of a select
statement generated by JavaScript.

The JavaScript opens a div, inserts an H2 (empty), opens a select list,
adds an end-option tag, closes the select list, and closes the div.
This creates a totally empty select list.

Next in the source you will see another script called (<script
src="script.aspx?affiliate=1246&b=True&bp=18&sourc e=89"
type="text/javascript">)

If you overlap-splice the src= value to the URL you are looking at, you
get
http://cache.directorym.com/creative...p=18&source=89

Go there. You are looking at the JavaScript source. [I did all this
with Firefox 2...]

Scroll to the bottom, past all of the x = y stuff, and you will see the
code that does the work, adding options to the empty select list. I
didn't examine it in detail, but the result is that odd numbered options
retain the background-color inherited from the cascade (transparent),
while even numbered options are given a different background-color via a
style= attribute inserted into the document.

In case the user has JavaScript turned off, there's a <noscriptversion
which skips the select list and just displays the links, without the
odd-even highlighting.

But, if you are patient, CSS3 will apparently be adding selectors for
odd and even children (see
http://www.w3.org/TR/2005/WD-css3-se...h-child-pseudo)
so that this can be done without JavaScript.

Chris Beall
Jan 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Steven T. Hatton | last post by:
Stroustrup says this: http://www.research.att.com/~bs/bs_faq2.html#macro "So, what's wrong with using macros?" "And yes, I do know that there are things known as macros that doesn't...
10
by: Heiko Pliefke | last post by:
Hi NG! I wrote a stored procedure which at first deletes 100.000 rows and then inserts 100.000 new rows. There is a huge difference between executing this SP in the query-analyzer (runtime...
6
by: Sjaakie | last post by:
Hi there, I'm trying to get this working with Firefox. Can you point out what's wrong? No problems with IE, Firefox doens't fill selMonth... TIA >>> the script... >>> <select name="selDay"...
6
by: chow.sheryl | last post by:
check out these cool effects on http://luguba.com q1. how do they open new page without the browser showing any progress? q2. how do they know what area I am in? Sheryl
24
by: Gaijinco | last post by:
I found one of that problems all of us have solve when they begin programming: given 3 numbers print the greater and the lesser one of the set. I was trying to remember the if-then-else...
6
by: Gordowey | last post by:
Where can I find this DIV effect. go to: http://www.amazon.com Put mouse over the text "See All 32 Product Categories" (Top-Middle)..it will open a window with a cool effect... does anyone...
13
by: Frank Swarbrick | last post by:
IBM has a product for the VSE operating system called the VSAM Redirector. It allows you to use VSAM to access RDBMS tables/views as if they were actual VSAM files. We're doing a comparison right...
10
by: sara | last post by:
I have been volunteered to write a simple system to help a non-profit enter and track information on the elders they serve. (It's actually a fascinating activity, and very rewarding to be helping...
5
by: shawncraig | last post by:
Since the ShowDialog() doesn't allow the frmGreyOut finish loading. The cool greyed out effect is never seen. Just the popup called frmYesNo Private Sub frmGreyOut_Load(ByVal sender As Object,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.