Jump to content

O.T. Javascript fuction -> parameter as variable ...


Recommended Posts

Posted

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+'''])'+
                        '};'+
                        '}'+
                    '})'+
                '}'

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...