code around ie issues for location

Assigning incomplete url won't work for local files in ie7 and ie8. Means controls won't work when test page is opened locally.