Author Topic: How to do this  (Read 903 times)

Offline Killer2

  • Level 4
  • *
  • Posts: 13
  • Reputation: +0/-0
    • View Profile
How to do this
« on: August 06, 2007, 01:09:21 PM »
I made a new registering script. Where you can choose your race. But I want to make a separate information text about each race. If you select another one, there should be a new piece of information displayed with that race it's description.

Does anybody know how it can be done? Or knows a link how?

Offline Zeggy

  • Global Moderator
  • Level 35
  • *****
  • Posts: 1,187
  • Reputation: +13/-4
    • View Profile
Re: How to do this
« Reply #1 on: August 06, 2007, 02:24:14 PM »
I think this could be done using Javascript. If you don't want to use JS, you could just add a link called "More Info" that will open a new page showing all the details.

If you want to use Javascript, use the innerHTML element. Here's an example:

Code: [Select]
<script>
//You'll need to use some if's here to check IF a race has been selected, and if so, what to show.
document.getElementById('raceInfo').innerHTML="Put your race info/html in here."; //This line will set the html in the div below to whatever is in between the quotes
</script>

<div id="raceInfo">Select a race for more info.</div>

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal