I want to get the URL for my site collection. One way I thought I could do it was using the window.location in javascript and getting it that way.
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. http://mysharepoint:29292/