# Alternative to get\_element\_value method for HtmlDialog

**URL:** <https://forums.sketchup.com/t/alternative-to-get-element-value-method-for-htmldialog/33753>\
**Category:** Ruby API\
**Tags:** make-2017\
**Created:** [November 12, 2016, 1:25am UTC](https://forums.sketchup.com/t/alternative-to-get-element-value-method-for-htmldialog/33753 "2016-11-12T01:25:25Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [March 13, 2018, 11:50am UTC](https://forums.sketchup.com/t/alternative-to-get-element-value-method-for-htmldialog/33753/11 "2018-03-13T11:50:59Z")

</div>

Please reformat (edit) the above post, following the instructions on posting code in the forum.  
(And have your editor replace tabs with 2 space characters.)

- [[How to] Post correctly formatted and colorized code on the forum?](https://forums.sketchup.com/t/how-to-colourize-code-on-the-forum-wiki/46189/)

* * *

Do not use [`UI.messagebox`](http://ruby.sketchup.com/UI.html#messagebox-class_method) to debug code.

1. It can fail silently if the evaluation of the string fails.
2. It is modal and freezes SketchUp’s Ruby, and this causes weird behavior especially in event driven callbacks.

**Instead** , use [`puts()`](http://ruby-doc.org/core-2.2.4/Kernel.html#method-i-puts) to output info to the Ruby Console.

---

_[View the full topic](https://forums.sketchup.com/t/alternative-to-get-element-value-method-for-htmldialog/33753)._
