R
Radu
Hi.
I have files in the "Scorecard Previews" subfolder of the virtual path
of my app,
the absolute path being
C:\Data\Ordering Process\Scorecard Previews\
I have a javascript function which changes the href of an <a>
depending on some selection in a combo. If in the javascript function
I set the href like this:
hLink.href="/Scorecard Previews/"+ cbo.options[index].text +
".doc"
the <a> points to something like
http://localhost:1218/Scorecard Previews/MyScorecard_1.doc
which is not correct - it should be
http://localhost:1218/Ordering Process/Scorecard
%20Previews/MyScorecard_1.doc
(I'm missing part of the path) - the path to the application.
If i set the href like this:
hLink.href="~/Scorecard Previews/"+ cbo.options[index].text
+ ".doc"
the <a> points to something like
http://localhost:1218/Ordering Process/~/Scorecard
%20Previews/MyScorecard_1.doc
which is not correct - it should be
http://localhost:1218/Ordering Process/Scorecard
%20Previews/MyScorecard_1.doc
(I have an extra "~" character).
How should I set the path in JavaScript ?
In VB.net (code behind) it has been very simple:
cmdOpenScorecardPreview.NavigateUrl = "~/Scorecard
Previews/" & strSelectedScorecard
Thanks a lot
Alex
I have files in the "Scorecard Previews" subfolder of the virtual path
of my app,
the absolute path being
C:\Data\Ordering Process\Scorecard Previews\
I have a javascript function which changes the href of an <a>
depending on some selection in a combo. If in the javascript function
I set the href like this:
hLink.href="/Scorecard Previews/"+ cbo.options[index].text +
".doc"
the <a> points to something like
http://localhost:1218/Scorecard Previews/MyScorecard_1.doc
which is not correct - it should be
http://localhost:1218/Ordering Process/Scorecard
%20Previews/MyScorecard_1.doc
(I'm missing part of the path) - the path to the application.
If i set the href like this:
hLink.href="~/Scorecard Previews/"+ cbo.options[index].text
+ ".doc"
the <a> points to something like
http://localhost:1218/Ordering Process/~/Scorecard
%20Previews/MyScorecard_1.doc
which is not correct - it should be
http://localhost:1218/Ordering Process/Scorecard
%20Previews/MyScorecard_1.doc
(I have an extra "~" character).
How should I set the path in JavaScript ?
In VB.net (code behind) it has been very simple:
cmdOpenScorecardPreview.NavigateUrl = "~/Scorecard
Previews/" & strSelectedScorecard
Thanks a lot
Alex