If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Calling PHP with Javascript

I have a problem trying to call a PHP script from Javascript. My webpage has the extension .php. What I need to do is call the function email when my Javascript var doneAction is complete. Where am I wrong in this code? Please Help!

What I am trying to do is have the email client on a computer open up after the variable doneAction is complete. This code is inside a wordsearch puzzle. Originally, when var doneAction was complete a simple alert popped up saying well done. What I would like to do is have it so that the person completing the wordsearch can email me their name so I can tell who has done the wordsearch. The reason for opening the email client only when the puzzle is complete is to be assured that the person actually completed the puzzle. The window.open Javascript will work but it opens the email client as soon as you enter the page. Here is the original doneAction code.
var doneAction = "alert(\"Well done!\");";
Is it possible to activate the email client any other way?
Is it possible to have it that when you click the alert button to then activate the email client?

I have tried this to open another webpage after var doneAction
var doneAction = "window.open('sendentry.htm');";
Then I have a PHP mail script but the doneAction will not work! What is wrong with this?