+1  A: 

Are you using a submit button to call send_newsletter?

onreadystatechange callback function 'ajaxResult' is not called because you're doing a synchronous call to the server:

resource.open(t,u,false);

if you want ajaxResult to be called change it to :

resource.open(t,u,true);

for now that's what I see. You have to provide more info like how do you call send_newsletter?


EDIT:(following author comment)

an INPUT of type image is a graphical submit button.

najmeddine
Sorry, its just being called from an input image with an onclick event.
Psytronic
ok, see my edit.
najmeddine
+1  A: 

An input of type "image" will behave the same as a submit button. Use an anchor or button type input to trigger your method.

<input type="button" onclick="send_newsletter()" value="Send" />

<button onlclick="send_newsletter()">... </button>

<a href="#" onclick="send_newsletter(); return false;"><img src="... /></a>
Ishmael
Ah, thanks for the link, never knew image inputs worked as submits. I'll just convert to an img with an onclick, Thanks
Psytronic