function ReadApplet_I(){
<!-- this array should be produced using WIMS variables... -->;
var list_of_objects=["freehand_drawing,"noname"","point,p1,p2,p3","line,l1,l2","function","area,poly1","angle,a1","circle","fixedcircle","segment"];
var count=0;var reply=new Array();var data;var tmp;
for(var p=0;p<list_of_objects.length;p++){
tmp=list_of_objects[p].split(',');
if(tmp[0].length>0){
for(var s=1;s<tmp.length;s++){
data=document.applets[0].getDrawing(tmp[0],tmp[s]);
if(data.indexOf("error")!=-1){
alert("Your answer will not be send...\nthe next object could not be detected in your drawing...\n\n:"+data); return;
}
else
{
reply[count]=data;
count++;
}
}
}
}
}
function ReadApplet_II(){
<!-- this function retreives all construction details -->
<!-- excluded objects with name prefix "my_" -->
var data=document.getElementById("CaR").getAllObjects().split(',');
var cnt=0;var reply=new Array();
for(var p=0;p<data.length;p++){
reply[cnt]=data[p].toString();
cnt++;
}
alert("the reply is:\n"+reply);
}
|
Get all objects in the drawing: or ... Get the xml-string from the original public function: or ...
|