It seems when javascript is disabled, the post action of forms uses
relative urls rather than absolute ones.
For example, if the following simple program is deployed at /cgi, the
html will be is "<form method='post' action='cgi/clicked/?wtd=..."
If you click repeatedly, the urls will become
/cgi/clicked/?wtd=...
/cgi/clicked/cgi/clicked/?wtd=...
/cgi/clicked/cgi/clicked/cgi/clicked/?wtd=...
/cgi/clicked/cgi/clicked/cgi/clicked/cgi/clicked/?wtd=...
which doesn't seem right to me.
#include <Wt/WApplication>
#include <Wt/WPushButton>
using namespace Wt;
class Test: public WApplication{
public:
Test(const WEnvironment&);
void OnClick();
};
Test::Test(const WEnvironment& env): WApplication(env){
WPushButton *p = new WPushButton("click", root());
p->clicked.connect(SLOT(this, Test::OnClick));
}
void Test::OnClick(){
WApplication::instance()->setInternalPath("/clicked/");
}
WApplication *createApplication(const WEnvironment& env){
return new Test(env);
}
int main(int argc, char **argv){
return WRun(argc, argv, &createApplication);
}
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest