More than one function being fired by the onclick button

I have to have two functions being operated by the onclick button I have coded this way but i am not sure its allowing the second function to work.

Any advice please will be greatly appreciated my code is as follows;

<a ui-sref=“yourDetails” id=“Upload-Button” value = “save” class=“button button-balanced button-block” onclick = “populateStorage(),retrieveStorage()”>Upload

It has to be designed through "ionic mobile app creator which is why the tag element of (<a ui-sref) is there because its meant to be.



Not sure, but I guess a semi-colon should work:

onclick = "populateStorage();retrieveStorage()"

Add semi-colons to the end of both functions:
onclick = “populateStorage(); retrieveStorage();”

Also, I would instead consider doing something like this instead of putting the function inline:

document.getElementById(‘Upload-Button’).addEventListener(‘click’, function(){

1 Like

MANY MANY THANKS! I will give it a try and post back my results

1 Like