/    Sign up×
Community /Pin to ProfileBookmark

i need to redirect to relative paths

i am developing an application using asp.net and jscript, the application is in a virtual directory at the localhost ([url]http://localhost/application1)[/url].
all i need is to dinamically identify the virtual directory path with javascript so when i open a window like (window.location.href=”Cal/mal.aspx?try=f&i=2″) from any where in the application the link can be readed.. in fact something like response.redirect(“~/cal/mal.aspx”), please 4 jscript gurus…. Advice

note: please don’t tell me why can’t i redirect the link from the .net code.. cuz i ve my reasons.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @have_enthusiasm spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...