Hi.
I have files in the "Scorecard Previews" subfolder of the virtual path
of my app,
the absolute path being
C:\Data\Orderin g Process\Scoreca rd 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 <apoints to something like
http://localhost:1218/Scorecard%20Pr...corecard_1.doc
which is not correct - it should be
http://localhost:1218/Ordering%20Process/Scorecard
%20Previews/MyScorecard_1.d oc
(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 <apoints to something like
http://localhost:1218/Ordering%20Process/~/Scorecard
%20Previews/MyScorecard_1.d oc
which is not correct - it should be
http://localhost:1218/Ordering%20Process/Scorecard
%20Previews/MyScorecard_1.d oc
(I have an extra "~" character).
How should I set the path in JavaScript ?
In VB.net (code behind) it has been very simple:
cmdOpenScorecar dPreview.Naviga teUrl = "~/Scorecard
Previews/" & strSelectedScor ecard
Thanks a lot
Alex