Member Avatar for leegeorg07

Hi, I am trying to make a twitter bookmarklet that will tweet the current page, I currently have this code:

javascript:window.open('http://twitter.com/?status='+self.location)

but when I try it, it changes the page its tweeting to just show [object Window]

how can I fix this?

javascript:window.open('http://twitter.com/?status='+document.location.href)
Member Avatar for leegeorg07

thats exactly the same. But I found how to fix it, I just added a

void()

around it, it all works fine now problem solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.