• Login
sketchucation logo sketchucation
  • Login
โš ๏ธ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Help to share data between SU Ruby and JS

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 2 Posters 199 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    NewOne
    last edited by 9 Jun 2009, 09:03

    Hello! I need to load the current value from a select box in a variable for further use and my JS skills are very close to zero ๐Ÿ˜ž . Please help me with this.
    Please edit the attached script to show me how to load the current value from "Val" selectbox in a ruby variable.

    -edit-
    image attachment for visual explanation. I have tried something like this http://blog.techsaints.com/2007/05/06/javascript-how-to-get-selected-item-in-dropdown-select-list/ but couldn't make it to work. I don't fully understand this http://sketchupapi.blogspot.com/2008/02/sharing-data-between-sketchup-ruby-and.html and I'm sure that I made a mistake somewhere, but could not figure out where. That is why I need guidance from someone more experienced

    Thanks for any help.


    test.rb


    visual explanation

    1 Reply Last reply Reply Quote 0
    • T Offline
      todd burch
      last edited by 9 Jun 2009, 20:31

      I've modified your code to work. I've tested it in Safari. Should work in Windows just fine.

      Todd

      (EDIT - you can remove the <form> tags.)


      test.rb

      1 Reply Last reply Reply Quote 0
      • N Offline
        NewOne
        last edited by 9 Jun 2009, 21:26

        @unknownuser said:

        I've modified your code to work. I've tested it in Safari. Should work in Windows just fine.

        Todd

        (EDIT - you can remove the <form> tags.)

        Wow! thanks ๐Ÿ˜„ I tried something like that (but not really alike) before posting the problem here... and of course it did not worked.
        Thanks again. I will take a closer look to see where I did wrong...I know that I must love JS, but I still hate it ๐Ÿ˜„

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement