View Full Version : the innerHTML tag and child links

05-04-2004, 08:11 AM
I'm a newbie at js and started making my own script. I releaze the innerHTML script is deprecated, but I don't know why my links aren't working

(when you put your mouse over the cd title list, the links at the bottom don't work but you can right click-> open in new window...)
maybe its the way it refreshes?

<script type="text/javascript">
var album_id = new Array("myblueheaven", "trustinme", "lettherest", "penthouseserenade", "imconfessinthat", "astimegoes", "buttonsandbows", "youmademe", "icantgive", "thesefoolishthings", "ithadto", "youtookadvantage", "always", "iminthe", "youdosomething", "illgetby", "mairsydoats", "someonetowatch", "cantwebe", "onthesunny", "idontknow");
var album_name = new Array("My Blue Heaven", "Trust In Me", "Let the Rest of the World Go By", "Penthouse Serenade", "I`m Confessin` That I Love You", "As Time Goes By", "Buttons and Bows", "You Made Me Love You", "I Can`t Give You Anything But Love", "These Foolish Things", "It Had to Be You", "You Took Advantage of Me", "Always", "I`m in the Mood for Love", "You Do Something to Me", "I`ll Get By", "Mairsy Doats", "Someone to Watch Over Me", "Can`t we Friends?", "On the Sunny Side of the Street", "I Don`t Know Why");

function expand(id, name)

for (i=0; i < 21; i++)
revert(album_id[i], album_name[i]);

var str = "<td id='" + id + "', onmouseout=\"expand('" + id +"' , '" + name + "')\"><p id='selected'><a href=\"" + id + "\" type=\"audio/x-ms-wax\">" + name + "</a>";
str = str + "<br><a href='index.html' target='_blank'>Listen</a> | <a href='link.html'>Info</a> | <a href='link.html'>Lyrics</a></p></td>";

function revert(id, name)
var str = "<td id='" + id + "', onmouseout=\"expand('" + id + "' , '" + name + "')\"><a href=\"" + id + "\" type=\"audio/x-ms-wax\">" + name + "</a></center></td>";


I hope that much code enough, don't want to swamp the message.
Well I hope its something obvious

05-04-2004, 08:53 AM
nm, ill find a work around

05-04-2004, 11:07 AM
btw - innerHTML isn't deprecated because it was never a standard property - it's MS proprietary, but most of the other vendors have chosen to implement it as well. There's no problem with using it unless you're in XHTML mode.