Like I said I'd like to make something in js to give you the simple line to bind a key to a certain command example:
I want to bind enemy spotted to key x I just klick:
Commands Menu -> Radio-command Enemy Spotted -> [Enter custom-text mby with color] -> Hit button -> Output for console or config.
How I want to do this is pretty much figured out but I'm stuck at one part and that is to call the functions ?!
The output button works but not the clear button
So this is what it looks like:
Code:
function clear()
{
document.bindform.consoletext.value = "";
}
____________________________________________________________________________________________
<input type="button" id="giveit" value="Give it!" onClick="give();" /> // <--- Works no problem here
<br /> <input type="button" id="clearit" value="Clear it!" onClick="clear();" /> // <-- Problem here but what is different ?!
(I "collect" everything in the bindform where you choose color etc. mby a bit complicated but hey until now it worked ...) I just don't want the user to reload the page every time a new bind is needed or if he wants multiple binds in a config...
PS: I'm almost a total newbi to js, but I have more less than more experience with programming so a short answer is fine