//function to contributes to the campaign function contribute(uint campaignID) { Campaign c = campaigns[campaignID]; Funder f = c.funders[c.numFunders++]; f.addr = msg.sender; f.amount = msg.value; c.amount += f.amount; }

I am currently reading the JavaScript API tutorial ( https://dappsforbeginners.wordpress.com/tutorials/javascript-api-2/) , and I see there are options for initiating contract transactions from the script:contract.sendCoin('0x878965387afd76fd008e7668','500')as well as ways to initiate payments with ether:web3.eth.transact({to: document.querySelector('#recipient').value ,value: document.querySelector('#value').value});however, what should I call in order to do both in the same transaction? I want to send ether to a given contract AND pass some data at the same time. This would be similar to the "contribute" function from https://dappsforbeginners.wordpress.com/tutorials/contracts-that-send-transactions/