Author: Benton | Posted on: 4/8/2009 2:58:45 PM | Views : 430

Hi there,

My main javascript funcion will call the PageMethods function to communicate with the server. Depending on the result received from the server, the main javascript funcion needs to return either 'true' or 'false'.

I will call my main javascript function from a submit button click. Note that the function first checks if a certain checkbox is checked, if so, it checks for shipments by calling the server method. Submit should not happen if there are no shipments. On the server, the CheckForShipments static method will return a single letter, either "T" or "F".

Note that I do return either 'true' or 'false' from the OnCallComplete and OnCallError functions, but that doesn't do the trick. So I think I need to put an extra "return ???;" right after the call to the PageMethods function, but I am lost here.

Please take a look at my code below, and thanks in advance for any pointers Go to the complete details ...