Results 1 to 5 of 5

Thread: Links with Description Help

  1. #1
    Join Date
    Dec 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Links with Description Help

    I am trying to put the Drop-down Menu thing with Descriptions in a Table. I have the table with three Columns...If you go Here You can see what I am trying to do at the bottom of that page. All I need to add is the Catagory part. How would I do that?

    Here is the code I am useing...I haven't changed any thing with it yet...
    Code:
    <!--MC Radio V2(Shorty)-->
    <div class="tableborder"> <div class='maintitle' align='left'>Active Radio X</a></div> <table border="0" cellspacing="1" cellpadding="4"> <tr> <th align="center" width="23%" class='titlemedium'>Station</th> <th align="center" width="32%" class='titlemedium'>Description</th> <th align="center" width="20%" class='titlemedium'><center>Genre</center></th> </tr> <tr> <td class="row4" align="center">
    
    
    <b>Listen to </b><form name="form1">
    <select name="select1" size="1" onChange="displaydesc(document.form1.select1, thetext1, 'textcontainer1')">
    <option selected value="http://www.1club.fm/clubfm_media/v42.aspx?station=activex" target="newwin">Active Radio X</option>
    <option value="http://www.1club.fm/clubfm_media/v42.aspx?station=modernrock" target="newwin">Modern Rock</option>
    <option value="http://www.1club.fm/clubfm_media/v42.aspx?station=classicrock" target="newwin">102 Rock</option>
    <option value="http://www.1club.fm/clubfm_media/v42.aspx?station=hairband">Hair Band Rock</option>
    <option value="http://www.1club.fm/clubfm_media/v42.aspx?station=techno" target="newwin">Techno Club</option>
    </select>
     <input type="button" value="Listen" 
    onClick="jumptolink(document.form1.select1)">
    </form>
    
    </a></td> <td class="row4">
    <span id="textcontainer1" align="left" style="font:italic 13px Arial">
    </span>
    
    
    
    <script type="text/javascript">
    var thetext1=new Array()
    thetext1[0]="A hard hitting Rock Channel playing the best in Heavy Metal, Alternative, and 80s Hard Rock on the planet."
    thetext1[1]="The Net's New Rock Alternative. An edgy display of Active, Modern, Today & Classic Alternative Rock Music."
    thetext1[2]="LIVE from a City that built the Classic Rock format. Take a listen to the legendary bands that started it all."
    thetext1[3]="The House of Hair Spray and Spandex. Playing your favorite sleaze Rock Anthems of the 80s & early 90s!"
    thetext1[4]="Spinning the best in Trance and Techno Club Beats. Live from Chicago, it's the net's home for the best in underground sounds!"
    </script>
    
    
    <br /></td> <td class="row2" align="center">
    
    <script type="text/javascript">
    function displaydesc(which, descriptionarray, container){
    if (document.getElementById)
    document.getElementById(container).innerHTML=descriptionarray[which.selectedIndex]
    }
    
    function jumptolink(what){
    var selectedopt=what.options[what.selectedIndex]
    if (document.getElementById && selectedopt.getAttribute("target")=="newwin")
    window.open(selectedopt.value)
    else
    window.location=selectedopt.value
    }
    
    displaydesc(document.form1.select1, thetext1, 'textcontainer1')
    
    </script>
    
    </td></table></div><br>
    <!--End MC Radio V2(Shorty)-->
    Also, How do I make it so that the window opens in this size:
    width=747
    height=462

    I already tried adding it like this:
    Code:
    <option selected value="http://www.1club.fm/clubfm_media/v42.aspx?station=activex" target="newwin" width="747" height="462">Active Radio X</option>
    Last edited by Agent Moose; 12-06-2006 at 10:22 PM. Reason: Figirued out how to put Description in place where I want it. Also I changed the Code.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    FYI link to script on DD is here: http://www.dynamicdrive.com/dynamici...bodescribe.htm

    I'm not quite sure what you mean by the "Category part" not being added? To answer your second question, you'll need to find the line:

    Code:
    window.open(selectedopt.value)
    and change that to:

    Code:
    window.open(selectedopt.value, "", "width=747px, height=462px")
    See the bottom of this page for additional window attributes you can use.

  4. #4
    Join Date
    Dec 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The catagory part, I ment genre, but yea. There are three columns in the table I made. The first one is for the Drop-down menu, the second column is for the description, and the third is for the genre. I want the genre to be like the description, change with the option that the person chooses. Here is the code so maby you can figure out what I am talking about...

    Code:
    <!--MC Radio V2(Shorty)-->
    <div class="tableborder"> <div class='maintitle' align='left'>MC Radio V2</a></div> <table border="0" cellspacing="1" cellpadding="4"> <tr> <th align="center" width="23%" class='titlemedium'>Station</th> <th align="center" width="32%" class='titlemedium'>Description</th> <th align="center" width="20%" class='titlemedium'><center>Genre</center></th> </tr> <tr> <td class="row4" align="center">
    
    
    <b>Listen to </b><form name="form1">
    <select name="station" size="1" onChange="displaydesc(document.form1.station, description, genre, 'textcontainer1')">
    <option selected value="http://www.1club.fm/clubfm_media/v42.aspx?station=activex" target="newwin">Active Radio X</option>
    <option value="http://www.1club.fm/clubfm_media/v42.aspx?station=modernrock" target="newwin">Modern Rock</option>
    <option value="http://www.1club.fm/clubfm_media/v42.aspx?station=classicrock" target="newwin">102 Rock</option>
    <option value="http://www.1club.fm/clubfm_media/v42.aspx?station=hairband">Hair Band Rock</option>
    <option value="http://www.1club.fm/clubfm_media/v42.aspx?station=techno" target="newwin">Techno Club</option>
    </select>
    <input type="button" value="Listen"
    onClick="jumptolink(document.form1.station)">
    </form>
    
    </a></td> <td class="row4">
    
    <span id="textcontainer1" align="left" style="font:italic 13px Arial">
    </span>
    <script type="text/javascript">
    var description=new Array()
    description[0]="A hard hitting Rock Channel playing the best in Heavy Metal, Alternative, and 80s Hard Rock on the planet."
    description[1]="The Net's New Rock Alternative. An edgy display of Active, Modern, Today & Classic Alternative Rock Music."
    description[2]="LIVE from a City that built the Classic Rock format. Take a listen to the legendary bands that started it all."
    description[3]="The House of Hair Spray and Spandex. Playing your favorite sleaze Rock Anthems of the 80s & early 90s!"
    description[4]="Spinning the best in Trance and Techno Club Beats. Live from Chicago, it's the net's home for the best in underground sounds!"
    </script>
    
    
    <br /></td> <td class="row2" align="center">
    <span id="textcontainer1" align="center" style="font:italic 13px Arial">
    </span>
    <script type="text/javascript">
    var genre=new Array()
    genre[0]="Rock"
    genre[1]="Rock"
    genre[2]="Rock"
    genre[3]="Rock"
    genre[4]="Techno"
    </script>
    
    
    
    <script type="text/javascript">
    function displaydesc(which, descriptionarray, genrearray, container){
    if (document.getElementById)
    document.getElementById(container).innerHTML=descriptionarray[which.selectedIndex]
    }
    
    function jumptolink(what){
    var selectedopt=what.options[what.selectedIndex]
    if (document.getElementById && selectedopt.getAttribute("target")=="newwin")
    window.open(selectedopt.value, "", "width=747px, height=462px")
    else
    window.location=selectedopt.value
    }
    
    displaydesc(document.form1.station, description, genre, 'textcontainer1')
    
    </script>
    
    </td></table></div><br>
    <!--End MC Radio V2(Shorty)-->
    Thanks if you can help.

  5. #5
    Join Date
    Dec 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I will make it easer for people to understand what I am saying.

    How do I have a nother section that changes with the drop-down option like the description. Basicly, just add another description?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •