You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vance Fellers <nv...@yahoo.com> on 2008/12/29 18:11:04 UTC

How to access the AJAX transport.responseXML

I need to access the XMLHttpRequest.responseXML from my javascript for a
Wicket web page.  I followed the code in the wicket-ajax.js, seen below. I
assume this.loadedCallback is the onSuccess function, but  how to access
responseXML passed in the xmldoc variable, or have loadedCallback call my
javascript function with the responseXML?

> if (typeof(window.XMLHttpRequest) != "undefined" && typeof(DOMParser) !=
> "undefined") {
>      var parser = new DOMParser();
>      xmldoc = parser.parseFromString(responseAsText, "text/xml");
>   } else if (window.ActiveXObject) {
>      xmldoc = t.responseXML;
>   }
>   // invoke the loaded callback with an xml document
>   this.loadedCallback(xmldoc);
> }

Vance
-- 
View this message in context: http://www.nabble.com/How-to-access-the-AJAX-transport.responseXML-tp21206061p21206061.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to access the AJAX transport.responseXML

Posted by Vance Fellers <nv...@yahoo.com>.
Martin, the application provides the web page administrator the ability to
assign styles to a web page by user group.  For example, the visbility of
certain fields or tabs will be displayed on an as need basis.  

These administered styles are stored in a database table.  When a page is to
be loaded, the stored styles are fetched and streamed to the page as XML or
JSON.  The responseXML is acquired;  in the onSuccess function, the XML or
JSON is read and the Javascript on-the-fly applies the styles.
 

Martijn Dashorst wrote:
> 
> What is the usecase for needing to acces the responseXML coming from
> Wicket?
> 
> Martijn
> 

-- 
View this message in context: http://www.nabble.com/How-to-access-the-AJAX-transport.responseXML----tp21206061p21218950.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to access the AJAX transport.responseXML

Posted by Martijn Dashorst <ma...@gmail.com>.
What is the usecase for needing to acces the responseXML coming from Wicket?

Martijn

On Mon, Dec 29, 2008 at 6:11 PM, Vance Fellers <nv...@yahoo.com> wrote:
>
> I need to access the XMLHttpRequest.responseXML from my javascript for a
> Wicket web page.  I followed the code in the wicket-ajax.js, seen below. I
> assume this.loadedCallback is the onSuccess function, but  how to access
> responseXML passed in the xmldoc variable, or have loadedCallback call my
> javascript function with the responseXML?
>
>> if (typeof(window.XMLHttpRequest) != "undefined" && typeof(DOMParser) !=
>> "undefined") {
>>      var parser = new DOMParser();
>>      xmldoc = parser.parseFromString(responseAsText, "text/xml");
>>   } else if (window.ActiveXObject) {
>>      xmldoc = t.responseXML;
>>   }
>>   // invoke the loaded callback with an xml document
>>   this.loadedCallback(xmldoc);
>> }
>
> Vance
> --
> View this message in context: http://www.nabble.com/How-to-access-the-AJAX-transport.responseXML-tp21206061p21206061.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org