I found a Javascript function that does everything I need to and would potentially replace my 15 lines of PHP code. Problem is I know nothing about JS.
The function is called upon click and reads the input from a text box and passes that parameter to the function.
I was wondering if I could have the function called without a click event. Says like when that line of code it read instead. I am not going to be using the input from the text box but directly pass a predefined variable instead
Anyone with the JS know how on doing this?
original call
The function is called upon click and reads the input from a text box and passes that parameter to the function.
I was wondering if I could have the function called without a click event. Says like when that line of code it read instead. I am not going to be using the input from the text box but directly pass a predefined variable instead
Anyone with the JS know how on doing this?
original call
Code:
onclick="DoSomething(document.frmPreselect.txtName.value)"