1

I have this javascript command, which works fine:

return top.GO.tasks.showTaskDialog({tasklist_id:907});

However I would like to insert a variable called id instead of "907".

I have tried

return top.GO.tasks.showTaskDialog({tasklist_id: + id + });

but that does not work..

Thanks for all help!

1
  • 2
    return top.GO.tasks.showTaskDialog({tasklist_id: id }); no need the +s because its not a string Commented Mar 21, 2017 at 12:33

1 Answer 1

4

Assuming the id variable already exists:

return top.GO.tasks.showTaskDialog({tasklist_id: id});

{tasklist_id: id} represents an object that has a property called tasklist_id whom value is the one contained by the id variable.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Erazihel. Works exactly as I wanted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.