sketchucation logo sketchucation
    • Login
    1. Home
    2. lendle
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: WebDialog vs. Win7/IE10 problem

      @jolran said:

      Just for the record, don't use UI.messagebox for debugging. Sometimes it fails silently.

      Dear sir:
      Thanks for the reply. The UI.messagebox part does not fail. It just display an empty string.
      By the way, the program works well on Mac/Safari. It just fails on Win7/IE10.

      Regards,
      Lendle Tseng

      posted in Developers' Forum
      L
      lendle
    • RE: WebDialog vs. Win7/IE10 problem

      @thomthom said:

      Sounds like you're not providing the correct ID name to the INPUT element.

      Got a sample snippet that fails?

      Dear sir, thanks for reply.
      Th ID/Name of the input element is correct and the program works on Mac/Safari.

      posted in Developers' Forum
      L
      lendle
    • RE: WebDialog vs. Win7/IE10 problem

      Thanks for the reply. The id/name of the input element is correct since the same program runs fine on a Mac/Safari environment. Below is the code snippet:

      HTML:

      <html>
          <head>
              <meta http-equiv="X-UA-Compatible" content="IE=7"/>
          </head>
      	<script type="text/javascript">
      		function test1(){
                              document.getElementById("data1").value="123456";
      			window.location.href="skp;ruby_messagebox@";
      		}
      	</script>
      	<body>
      		<a href="javascript&#058;test1()">12345</a>
      		<input type="hidden" id="data1" name="data1" value="123">123456</input>
      	</body>
      </html>
      

      Ruby:

      tool_menu.add_item("HelloWorld Tool") {
         dlg = UI;;WebDialog.new("Show Sketchup.com", true, "ShowSketchUpDotCom", 739, 641, 150, 150, true);
         dlg.add_action_callback("ruby_messagebox") {|dialog1, params|
      	   UI.messagebox(dialog1.get_element_value("data1"))
      	 }
      
         dlg.set_url "http://localhost;8080/SketchupWeb/"
         dlg.show
         UI.messagebox(dialog1.get_element_value("data1"))
      }
      

      Thank you!

      Regards,
      Lendle Tseng

      posted in Developers' Forum
      L
      lendle
    • WebDialog vs. Win7/IE10 problem

      Dear sir:
      I faced a problem with win7/IE10 combination. In my project, there is a need to get large string from a WebDialog. I know get_element_value should be used. However, on my win7 machine with IE10, get_element_value always return nil. I've tried using META information to force IE version from 7~10 but still in vain. The same program works with error on a Mac/Safari combination.
      I'm looking forward to suggestions, thank you!

      Regards,
      Lendle Tseng

      posted in Developers' Forum
      L
      lendle
    • 1 / 1