Hi!

I made a page where users can listen to music (with javascrip). I add a popup where they can choose what music to play, and when they choose it, this popup window close itself, and two hidden fields get the song information. In the script (you can see it here) is one function (setTimeout('display_time()',1000)). I tryed to add code to check if two hidden fields are empty or not (I add this:

songNew=document.getElementById('songNew').value
genreNew=document.getElementById('genreNew').value
if(songNew!="") next_song('4',songNew);

First I tryed only with "songNew", but this don't work! (of course, at next_song I add:

//in function
function next_song(dir,s)
//and in this function
if(dir==4) current_song=s

But this doesn't work. Can somebody help me?

I found solution, but it's different, so you don't have to answer to this thread!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.