I assume you meant var url = ... because this actually creates a 'url' variable in the global (window) scope. Is this intended?
If yes then why? and also using implicit global variable declaration should be avoided. 
Instead use window.myVar = something to make it clear that you meant it.