create and store cookies of onclick div (dynamically) : I'm trying to create a cookie to store a text value of a div. I know I can use Document.getElementById('whatever') to get the text but I need the function to be dynanmic (non-specific) by getting the text of the onclick div. Can anyone lend me a helping hand by showing me how should I change my code to make this work? Thanks. 

    <a href="" onClick="getOrder">#1234WDF</a>
    <a href="" onClick="getOrder">#7643FER</a> 
      
    function getOrder(order){
      createCookie('order', $this.text, 90);
    }