Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have two different option boxes in my form and then two different scripts to pull this data on the click is this how I execute both scripts or will this not work?
<input class="form-control" type="button" onclick="fun() && fun2()" value="Submit">
yes, make it
<input class="form-control" type="button" onclick="fun(); fun2();" value="Submit">
or you can call one function which will call both of them
<input class="form-control" type="button" onclick="fun();" value="Submit"> function fun() { fun1(); fun2(); }
Add a comment
Yes thats pretty easy:
function myFunction(){ functionOne(); functionTwo(); }
Then you can simply call myFunction on the onklick attribute
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.