Help to share data between SU Ruby and JS
-
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 experiencedThanks for any help.
-
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.)
-
@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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement