Jump to content

abutton.JSInterface.JSCall('click',[]) possible to pass a parameter ?


Roberto Nicchi

Recommended Posts

6 minutes ago, Roberto Nicchi said:

I have tryed  with thebutton.JSInterface.JSCall('click',[1]) but the result in an exception: a.preventDefault is not a function

Yes, sorry. I have not noticed that it is not user-defined function.

What did you want to achieve by passing parameter 1?

Link to comment
Share on other sites

In the main form (onkeydown event) when the user press F6, is exeuted the click js event of a button that is inside a frame (see the last post of the thread Grid is in dirty state - General - uniGUI Discussion Forums). In the click js event i would like to know if the function key (F6) has been pressed alone or together with SHIFT key. The idea was to execute JsCall passing a parameter.

Link to comment
Share on other sites

5 minutes ago, Roberto Nicchi said:

In the main form (onkeydown event) when the user press F6, is exeuted the click js event of a button that is inside a frame (see the last post of the thread Grid is in dirty state - General - uniGUI Discussion Forums). In the click js event i would like to know if the function key (F6) has been pressed alone or together with SHIFT key. The idea was to execute JsCall passing a parameter.

Hmm, sorry, your case is not very clear to me.

Link to comment
Share on other sites

In the mainform.onkeydown event

var

  shf:boolean;

begin

    if key=VK_F6 then
    begin
      if ssShift in shift then shf:=true
      else shf:=false;

      Tstandard_frame(pc.activepage.Controls[0]).F6_but.JSInterface.JSCall('click',[]); // i want to pass the shf variable to the click event.
    end
 

 

The frame.F6_but.click js event:

function click(sender, e, eOpts)
{

  if shift_has_been_pressed then // i miss this part now

     ajaxRequest(this, '_executeF6shift', []);

  else
    ajaxRequest(this, '_executeF6', []);
}

Link to comment
Share on other sites

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...