function uploadimg (theform,ajaxAction,ajaxTarget){
var imgDesc = theform.getInputs("page1", "text","imgDesc");
alert(imgDesc[0]); //have also tried just imgDesc and imgDesc.getValue()
defaultAction=theform.action;
defaultTarget=theform.target;
theform.action=ajaxAction;
theform.target=ajaxTarget;
theform.submit(); //Submit the form.
//Then display a loading message to the user.
setStatus ("Please wait while your image uploads...","showimg");
theform.action=defaultAction;
theform.target=defaultTarget;
}