I think the same problem as mentioned
here: https://groups.google.com/d/msg/web2py/eS0bKdwuQuY/-v0lBhtIpPgJ. In
your iframe, you have src='webpage.html' -- because the URL does not start
with a "/", the browser interprets it as being relative to the current URL.
So, when the parent page is http://mydomain.com/myapp/default/test, the
iframe source becomes http://mydomain.com/myapp/default/webpage.html, which
is what you want. But when the parent page
is http://mydomain.com/myapp/default/test/4, the iframe source
is http://mydomain.com/myapp/default/test/webpage.html, which routes to the
test() function with "webpage.html" in request.args[0] -- so you're just
nesting iframes of the same page.
Anthony
On Sunday, May 6, 2012 11:33:58 AM UTC-4, simon wrote:
>
> Please can someone explain this.....
>
> When I enter test using the code below then I can see a page with "TEST"
> and "CONTENTS" which is what I wanted.
> However when I open test/4 it shows three nested iframes each with "TEST"
>
> def test():
> response.view="default/test.html"
> return dict()
> def webpage():
> return XML("CONTENTS")
>
> test.html
>
> TEST
> <iframe src='webpage.html' scrolling="no" width="100%"></iframe>
>