Hi
I’m having a bit of a problem.
I have a form select that triggers a Ajax function like this:
[CODE]<select name=”SongName” onchange=”
if (this.value==’new songname’)
{UpdateTracklist(‘put in a new song’);}
ELSE
{UpdateTracklist(‘an already existing song’);}”>
<option value=”new songname”>new song</option>
<option value=”some title”></option>
<option value=”another title”></option>
and so on
What I need it to do is to do something when the option new songname is selected and something else then an already existing title from the list is selected.
If I just write <select name=”SongName” onchange=”
UpdateTracklist(‘an already existing song’);”>
Then it works fine and the song is put in the database.
But when I put in the IF ELSE codes the thing about ‘new songname’ works but the thing about an already existing song suddently doesn’t work.
So it works seperately but when put together it is only the codes before the ELSE statement that works ?
is there anyone who can see what I’m doing wrong ?