I've deployed the following contract to Ethereum testnet.
contract demo {
string public name = "someString";
function returnValue() constant returns (string){
return name;
}
}
I am trying to retrieve the contract's string and this won't work
var contract = web3.eth.contract(contractAddress, abi); //contractAddress+abi known
console.log(contract.returnValue);
returns undefined
If I use this code:
var asdf = web3.eth.contract(abi).at(contractAddress);
alert(asdf.returnValue);
I get `function(){[native code]} How can i get the string "name" from my solidity contract to my javascript? Thank you