Support #1164
closedAnchor to internal path html
0%
Description
Hello,
I need to navigate to an html file located in a subdirectory off docroot in a new window. My app may build
html files which I will need to display on demand. I try to do:
Wt::WAnchor* a = new WAnchor(WLink(WLink::InternalPath, "myHtml.html"),"Doc link text", this);
a->setRefInternalPath("/subdir");
a->setTarget(TargetNewWindow);
This brings up a new window, but it is my application page again with the url showing my app url with ?_/subdir appended,
but my html doc is not displayed. It seems I'm misunderstanding how to utilize internal path navigation..
does anyone know what I'm doing wrong?
Thank you
Updated by Koen Deforche almost 13 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.2.1
Hey,
Internal paths are paths implemented by the application. An actual HTML file that is external to the application (but perhaps deployed in the docroot) should be used as a simple URL.
Thus you need:
Wt::WAnchor* a = new WAnchor("myHtml.html","Doc link text", this);
a->setTarget(TargetNewWindow);