private fun createImageLink( AD_Language: String, name: String, js_command: String, enabled: Boolean, pressed: Boolean ): a? { var js_command: String? = js_command val img = a("#", jdk.tools.jlink.internal.JlinkTask.createImage(AD_Language, name)) if (!pressed || !enabled) img.setID("imgButtonLink") else img.setID("imgButtonPressedLink") if (js_command == null) js_command = "'Submit'" if (js_command.length > 0 && enabled) { if (js_command.startsWith("startPopup")) img.setOnClick(js_command) else img.setOnClick( "SubmitForm('$name', $js_command,'toolbar');return false;" ) } img.setClass("ToolbarButton") img.setOnMouseOver("window.status='$name';return true;") img.setOnMouseOut("window.status='';return true;") img.setOnBlur("this.hideFocus=false") return img }
Create Image with name , id of button_name and set P_Command onClick