Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Scroll Over help  (Read 3145 times)

0 Members and 1 Guest are viewing this topic.

greasontim

  • Guest
Scroll Over help
« on: December 17, 2010, 09:42:23 AM »
http://www.playdota.com/heroes
http://www.playdota.com/items

I'm trying to make a section on my site for a game I'm working on.
No the links at the top aren't mine but I'm trying for a page like that so people can scroll over a Icon for a hero/item and it shows the basic info on the side. Like it does on the two links that I posted at the top of the thread.

Even grabbed all the sources for the site and still don't work.

Making a site using notepad than uploading and changing the files to the correct file type.
If you want to see the Raw code of the page let me know and I'll post a link to the Raw code for the page.
« Last Edit: December 17, 2010, 09:59:12 AM by greasontim »

rockerest



    Hopeful
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: Scroll Over help
« Reply #1 on: December 26, 2010, 11:54:37 PM »
How familiar are you with Javascript and AJAX?

That script is done entirely through AJAX and Javascript.

Since you looked at the code, you probably saw all the lines that looked like this:

Code: [Select]
<li><a id="it99" href="#" onclick="return showItem(99, 1, this);" onmouseover="return showItem(99, 0, this);"><img src="http://media.playdota.com/items/99/thumb.jpg" border="0"/></a></li>
In the <script> tags at the top of the page, there's this entry:

Code: [Select]
<script type="text/javascript" src="http://media.playdota.com/js/script.js?ver=2.3"></script>
That script does all of the page interaction.  After a bit of searching for "showItem," I found a function that essentially changed that right div to contain the correct content.  It does use an AJAX loader in another function, but you can figure that out if you have some knowledge of AJAX.

Good Luck,
-rockerest
In general, the PEBKAC.  Whether it's now or was three weeks ago, the PEBKAC.
Unsafe browsing and general computer / internet illiteracy IS the users problem.  Don't have sex if you don't know how to use a condom.
Also, there are 10 types of people in the world, those who understand binary, and those who don't.