Hi,

I am new to Tapestry so forgive me if the answer to this question is simple.

I am trying to create a navigation system using AJAX and Tapestry. 
All the navigation links call a javascript function that uses an
XMLHttpRequest to request a page from Tapestry and updates the
innerHTML of a div element with the response.  The html source is
included below.  This works fine until the page I request from
Tapestry needs to hook into the Body component to insert some
javascript.  For instance, I use the contrib:Palette component in one
page and it squawks when rendering due to the fact that it is not
wrapped by a Body component.  Is there any way around this or do I
have to forgoe using components that need to be wrapped by the Body
component?

Thanks,
Anthony

<html>
<script>
function navigateLink(arg) {
    var div = document.getElementById("content");
    var request = new XMLHttpRequest;
    request.open("GET", "/myApp/app?service=page/" + arg, true);
    request.onreadystatechange = function() {
                if(request.readyState == 4) {
                    div.innerHTML = request.responseText;
        }
    }
    request.send(null);
}    
</script>
<body>
<table>
<tr><td>Nav Bar</td></tr>
<tr><td><a href="#" onclick="navigateLink('Link1')">Link One</a></td></tr>
<tr><td><div id="content"/</tr></td>
</table>
</body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to