When we have a .js file which we reference from a View page and then have URLs in callback in JS file we run into problems with urls not being resolved when running site either on VS 2008 integrated webserver or on IIS7.
For example, we have this piece of code in JS file
pending.createCallback(pending.webRoot + "../../WidgetZoneV2/MoveWidget/" + sData, pending.widgetAdmin.moveComplete);
This piece of code works fine when run with integrated webserver (on the URL http://localhost:54354/WidgetZoneV2/)
but fails on IIS7 where we have an URL like this http://localhost/virtualdir/WidgetZoneV2
, because it the later case the URL in the callback gets translated into http://localhost/WidgetZoneV2
which of course does not exist.
How do you handle this sort of cases? As far as I can see the only option is to dinamically create JS at runtime.