In questo modo, Javascript:findsong(artist,''); e Javascript:findsong('',titl); richiamano proprio Javascript:findsong(artist,''); e Javascript:findsong('',titl);.. così la pagina viene linkata a void(0).. mentre dovrebbe essere (esempio) Javascript:findsong('antonello',''); e venire rimandati alla pagina ant_vend.htm .. oppure Javascript:findsong('','complicated'); per venire rimandati a avr_lavi.htm#Com ..codice:function evalutate(testo){ var artist = String; var titl = String; alert(testo); if (testo == sA.textA.value) {artist="'"+testo+"'"; alert(artist); alert("Javascript:findsong("+artist+",'')"); Javascript:findsong(artist,'');} else if (testo == sT.textT.value) {titl="'"+testo+"'"; alert(titl); alert("Javascript:findsong('',+titl+)"); Javascript:findsong('',titl);} } function findsong(artist,title){ switch(artist) { case 'Venditti'|'Antonello Venditti': window.location.href='ant_vend.htm' break; case 'atomic'|'kitten'|'atomic kitten': window.location.href='ato_kitt.htm' break; case 'undefinied': break; default: window.location.href='void(0)'; } switch(title) { case 'complicated'|'conplicated': window.location.href='avr_lavi.htm#Com'; break; case "i'm with you"|"im with you"|"with you": window.location.href="avr_lavi.htm#Imwi"; break; case 'undefinied': break; default: window.location.href='void(0)'; } }
I vari alert() mi danno il codice giusto..
Inoltre non sente bene il void(0).. o è espresso male nello switch?
ma da una pagina con URL: "F:\Documents and Settings\Administrator\Documenti\web\sito\song_src .htm\void(0)".
Pliiis..

Rispondi quotando