Someone
public text v1 · immutablefunction uploadimg (theform,ajaxAction,ajaxTarget){
var imgDesc = theform.getInputs("page1", "text","imgDesc");
alert(imgDesc[0]);
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;
}