Problemas ao criar um link Com uma funcao javascript

Opa [RESOLVIDO]
to com um problema para criar um link
tenho a seguinte função

[code] function getDate(TimeIni, TimeEnd){

	if (TimeIni ==null || TimeEnd == null || TimeIni =="" || TimeEnd == ""){
		return url = "TServlet?action=send&queue=Teste"
	}else{
		return url = "TServlet?action=send&queue=Teste&TimeIni="+TimeIni+"&TimeEnd="+TimeEnd
	}	
				
}[/code]

e ao chamar o o link:

<tr> <a href="javascript:getDate(TimeIni.value,TimeEnd.value);" > Teste</a></td> <td class="inputfield"><input name="TimeIni" type="text" value=""/></td> <td class="inputfield"><input name="TimeEnd" type="text" value=""/></td> </tr>

mas ele apenas retorna:
TServlet?action=send&queue=Teste
ou
TServlet?action=send&queue=Teste&TimeIni=10&TimeEnd=10

e se eu executo:

<tr> <a href="TServlet?action=send&queue=Teste" > Teste</a></td> <td class="inputfield"><input name="TimeIni" type="text" value=""/></td> <td class="inputfield"><input name="TimeEnd" type="text" value=""/></td> </tr>
ou

<tr> <a href="TServlet?action=send&queue=Teste&TimeIni=10&TimeEnd=10" > Teste</a></td> <td class="inputfield"><input name="TimeIni" type="text" value=""/></td> <td class="inputfield"><input name="TimeEnd" type="text" value=""/></td> </tr>

ele retorna o valor correto.

alguem pode me ajudar?

Coloque seu código dentro da tag [code] para melhor entendimento !

Tks.

Olá!

Pode ser um pouco tarde para uma resposta, mas você tentou o evento onclick do link?

[code]

Teste [/code] Desse jeito funciona...

opa vlw em thiagof pela resposta. E sim cara foi um pouco tarde mais eu consegui resolver utilizando o seguinte comando em javascript

location.href

exe:

[code]function getDate(Queue, TimeIni, TimeEnd){

	if (TimeIni ==null || TimeEnd == null || TimeIni =="" || TimeEnd == ""){
		location.href="http://localhost:9090/FotoSonicSite/SonicServlet?action=send&queue="+Queue
		
	}else{
		location.href="http://localhost:9090/FotoSonicSite/SonicServlet?action=send&queue="+Queue+"&TimeIni="+TimeIni+"&TimeEnd="+TimeEnd
	}	
}[/code]

Utilizando este comando ele returna o valor esperado.