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: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