I'm creating a dynamic gui and sometimes it does not contain any control. How can check if gui is empty before it is shown? Checking it's size? I would like to avoid a taskbar showing an empty gui.
Ok, now I see what you mean... like this? Sorry for being slow! html = ( <form> Name1: <input type="text" id="name1" name="name1"><br> Name2: <input type="text" id="name2" name="name2"><br> </form> <script> n1 = document.getElementById("name1") n2 = document.getElementById("name2") n1.addEventListen...
@teadrinker I'm not sure what you mean. The "addEventListener" is listening for the input of name1 and is replicating the value in the name2 while typing so they are always the same. It works well without a form. If the inputs are inside the form then it's not working. Sorry if I'm confusing...
@teadrinker , I know. However, I was trying to find a solution for a whole day today without success - after enclosing the inputs into the <form> the function doesn't work anymore. I admit I have limited html/javascript knowledge. Any tip?
teadrinker or anyone. I tried to combine two things I learned about in this topic. Unfortunately when I enclose the inputs into the <form>, then addEventListener function is not working anymore - error: name1 is undefined. Any idea how to solve this? Thanks. html = ( <form> Name1: <input type="text...
Thanks teadrinker , you did it again. I think I'm good with html now :) The only thing is that the script is a part of a larger script inside a custom Input() function and there are other functionalities as well - example below. In this case I need to submit the results of the form back to the funct...
Thanks teadrinker , I'll have to live with that. :) If you allow me another question... In the script below, html submit button submits the form and validates the input. Is it possible to define a ahk button to have the same role without using html submit button? And... how can Submit() function bel...
Hello, it's me again :) I tested different form input tags and it generally works. However there are some which cannot be styled properly. For example - <input type="number"> - there are no up/down arrows like in a browser - <input type="range"> - slider looks ugly and very different as in a browser...
Any idea why is Tab key not working for moving from field to field? Thanks html = ( <form id="form"> Name1: <input type="text" name="name1" id="name1" ><br> Name2: <input type="text" name="name2" id="name2" ><br> Name3: <input type="text" name="name3" id="name3" ><br> </form> ) gui, add, ActiveX, w3...
Thanks, works great! I may be having many entry fields with different validations. I see in this code I need to create an ahk validation too for each field to prevent closing the window... is there a way to avoid this and only rely on html validation?
Thanks, corrected and it works now. Any idea about the second question? - I need to add some validation. I added "<form>" tags, "required" attribute and "submit" button but cannot figure out how to connect it with my script - clicking the button should also close the gui window. Or should I somehow ...
Thank you so much teadrinker , this is awesome, I've learned a lot. I'm slowly progressing to create a html form. Few more questions. - Is it possible to set the focus on the first field so you can start typing immediately? I tried "autofocus" attribute and "focus" method but it doesn't work. Script...