InDesign JavaScript Tips and Tricks #10 – Table Navigation

In this video I demonstrate how to navigate through your table via JavaScript. Best viewed in HD. Please rate the video, and if you’ve found my tutorials use…

How to get the x and y position of the mouse coordinates. . ———————————————————- —
Video Rating: 5 / 5

About Editor

Comments

11 Responses to “InDesign JavaScript Tips and Tricks #10 – Table Navigation”
  1. regjsori says:

    Thnx for this helpful tutorial. But it does not work inside the canvas,
    when I try to move an Rectangle: context.fillRect(MouseX,MouseY,200,200);,
    or I’m doing something wrong

  2. Thisguy Jake says:

    my coords are NaN, NaN. do you have any idea what I did wrong?

  3. gyrostorms says:

    Oh really? That’s interesting. So is layerX the new or better way to do it?

  4. Miguel Stevens says:

    I don’t know for sure :) there’s not much documentation about it .. anyway
    i’m spamming your page here! nice tutorial that’s for sure! helped out a
    lot :)

  5. Miguel Stevens says:

    Newest firefox. Yup it’s strange i’ve been looking for almost an hour
    because the code wasn’t working for me. and when i used the layerX, which i
    read about earlier :) “mouseX= e.layerX;”

  6. gyrostorms says:

    @vummamoyo Oh thats great! Glad to help you :)

  7. Vuma Moyo says:

    Good stuff. Appreciate it. A great help for my project.

  8. Jonathan Delgado says:

    is there a reason as to why I was forced to add an
    “window.addEventListener(‘load’,init); function init() etc. and everything
    to do this? you didn’t need a load eventlistener to initialize,
    Bucky(TheNewBoston) used it all the time, but you didn’t; is it just
    something they added over time? I made sure our codes were identical down
    to the ID… several times…

  9. gyrostorms says:

    You shouldn’t need a load event listener if your “script” tag is below the
    content that you are trying to manipulate in js. In this case, in the html
    file our script tag is below the canvas which is what we grab by ID inside
    the js file. Bucky might have put the script tag inside the “head” element
    which would then require you to check for a load event because the js could
    run before the canvas even loaded which would cause an error.

  10. Miguel Stevens says:

    This function with the offsetLeft and offsetTop doesn’t work for me
    anymore. Instead just using layerX and layerY to get the coords :) Great
    tutorial by the way! thank you!

  11. gyrostorms says:

    Thanks! :) It doesn’t work anymore for you? What web browser do you use?

Powered by Yahoo! Answers