Q: Sending multiple transactions but one would always fail I've created my JS and Solidity smart contracts and both of them works fine. 
But I've written them in a way where they are called together. Two of the functions are from different contracts. 
Whenever i press the button to activate the functions 3 transactions (2 transactions of contract A & 1 transaction of contract B) would appear. I attached a photo.
If I press confirm for all, the first contract that is called will have a successful transaction but the second one wouldn't.
if (typeof(web3) === "undefined") {
   error("Unable to find web3. " + "Please run MetaMask (or something else that injects web3).");
} 
else {
   console.log("Found injected web3.");
   web3 = new Web3(web3.currentProvider);

   console.log("Connected to the Ropsten test network.");
   counterDB = web3.eth.contract(abiDB).at(addressDB);
   counterWallet = web3.eth.contract(abiWallet).at(addressWallet);                       
}

Is there a way where I can do everything in a single transaction? Am I writing the web3 line correctly?
This  is my full source code
