erich.wanker Posted September 18, 2017 Posted September 18, 2017 hello, var mein_top = me.top; "param0" should be the value of "mein_top" in following function 'ajaxRequest(VISUAL.form,''MARKER'',[''param0= ''+mein_top+'' '',''param2=+uniqueNumber+''])'+ i allways get "undefined" or the String "mein-Top" as output, but not the coordinate the line is part of following code: while not UniMainModule.VISUAL_MARKER.Eof do begin meine_marker_anzahl:=meine_marker_anzahl+1; meine_marker[meine_marker_anzahl]:=TUniImage.Create(self); //meine_marker[meine_marker_anzahl].Draggable.Enabled:=true; meine_marker[meine_marker_anzahl].JSInterface.JSAddListener( 'afterrender', 'function(me) {'+ 'Ext.onReady(function() {'+ 'me.dd=new Ext.dd.DDProxy(me, "");'+ 'me.constrain=true;'+ 'me.dd.startDrag=function() {'+ 'this.constrainX=true;'+ 'this.maxX=VISUAL.display_image.el.getRight()-me.width;'+ 'this.minX=VISUAL.form.getX();'+ 'this.constrainY=true;'+ 'this.maxY=VISUAL.display_image.el.getBottom()-me.height;'+ 'this.minY=VISUAL.form.getY();'+ 'me.dd.afterDrag=function() {'+ 'var mein_top = me.top;'+ 'var mein_left = me.left;'+ 'ajaxRequest(VISUAL.form,''MARKER'',[''param0= ''+mein_top+'' '',''param1= mein_left'',''param2='+uniqueNumber+'''])'+ '};'+ '}'+ '})'+ '}' Quote
erich.wanker Posted September 18, 2017 Author Posted September 18, 2017 like allways .. PERFECT .. it works Thanx :-) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.