I know that you can use ECMA script and the client object model to do this but unsure how.
I have tried:
var context = new SP.ClientContext; alert(context.get_url());
This is returning
How would I get it to include the full URL? i.e.