I’m getting this error while trying to connect addHistory button while linking html page to solidity (metamask) :

Error

HTML Code

Solidity Code

Javascript Code

I’m not able to connect it to my metamask as well as smart contract with this specific button only, pls help.

I tried to connect the metamask and smart contract through the code given in screenshot, but getting the error : invalid BigNumber String, what should i do?