Tried some javascript functionality