Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

How have they made this?!

I am just curious to how this website:

http://www.newgrounds.com/portal/

has got like a little popup table when you role over every row in the table to display the score of the flash,

can somebody give me a couple of links to tutorials??

i wana no! thanks.
0
cookiejest
Asked:
cookiejest
2 Solutions
 
callrsCommented:
Where is the table? What link do I click at that site to get to the part you're talking about?
0
 
bpmurrayCommented:
Each of the entries is a table cell that contains a link. When you move the mouse over the entry, it fires the onMouseOver event, and when you move the mouse away, it (obviously enough) fires the onMouseOut event. The page executes a piece of code for these events, so you have (looking at the first one):

    <a href="/portal/view/319383"
                   onMouseover="ShowDetails('Mr_br_kill', '?', '2,755Kb', 'Suitable For All', 'mr1');"
                   onMouseout="RemoveDetails('mr1');">
              Zelda&quot;s a bad bad girl
     </a>

So you can see "Zelda's a bad bad girl" is the text of the link and when you click on it it'll call the URL /portal/view/319383. When you move the mouse over, it executes the JavaScript function "ShowDetails" and when you move the moust away, it runs "RemoveDetails". I haven't looked at these javascripts, but if you look at more of the detail, it has actually the following structure in each table cell:
              <td width="100%" class="font_tahari_small" background="/portal/layout04/key_bg_gray.gif">
                    <div id="mr1" style="position:absolute;"></div>
                    <a href="/portal/view/319383" onMouseover="ShowDetails('Mr_br_kill', '?', '2,755Kb', 'Suitable For All', 'mr1');" onMouseout="RemoveDetails('mr1');">Zelda&quot;s a bad bad girl</a>
              </td>

The interesting part is the <div> since that's used to hold the popup. The signature of the calls are:
      ShowDetails(authorname, score, size, rating, div-ID> and
      RemoveDetails(div-ID)

There are some great sites for JavaScript and CSS tutorials - http://www.w3schools.com is pretty good.

There are other sites that go even further, and they use XmlHttpRequest to retrieve the data that pops up, but I think you should learn to walk before you run.
0
 
John-BaylesCommented:
<tr>
<td><img src="/portal/layout04/icon_movie.gif" width="12" height="14"></td>
<td align="center" class="font_arial_leftpane">29.</td>
<td width="100%" class="font_tahari_small"><div id="mr29" style="position:absolute;"></div><a href="/portal/view/319327" onMouseover="ShowDetails('Leonardo Campasso', '2.23/5.00', '630Kb', 'Suitable For All', 'mr29');" onMouseout="RemoveDetails('mr29');">Kill Billy</a></td>
</tr>


This is the key section of code:
onMouseover="ShowDetails('Leonardo Campasso', '2.23/5.00', '630Kb', 'Suitable For All', 'mr29');" onMouseout="RemoveDetails('mr29')

tutorial explaining this:
http://www.htmlcodetutorial.com/linking/_A_onMouseOver.html

0
 
cookiejestAuthor Commented:
thank you
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now