I tried this as a bookmarklet but nothing happens:

```
javascript:(function(){window.document.getElementById(".Compose").click();})

```

The error condole shows this:

```
[Error] TypeError: 'null' is not an object (evaluating 'window.document.getElementById(".Compose").click')
    (anonymous function) (launch, line 1)

```

I want to do this because I use webmail only and not a mail client.
My goal is to be able to copy text from a webpage and then open up a yahoo mail window, click 'compose' and paste in the object I had copied. I am trying to make a bookmarklet that will open up yahoo mail and click compose for me.Then I could manually fill in the destination address myself. Where is my syntax off?

Addendum: This also fails as a bookmarklet:

javascript:(function(){$(".btn-compose").click()})(); 

The console window does not show any errors either.
However this works in the console window 

$(".btn-compose").click()