If anyone could give me a pointer here I would be most grateful.
Have developed a Joomla AJAX search module for VirtueMart .
Works fine in everything except IE.
I know the reason is IE's limitation in innerHTML (block level html not allowed in inline)
The problem is the returned html from the AJAX call contains a form so IE throws an error.
To fix it I need to filter out the result before setting the html in the div, in other words select just the elements I need before doing the setHTML.
I've tried everything but I just can't get the syntax right. :chomp:
Here's what I have
the returned html has this structure..
So what I need to do is target the div class="browseProductContainer and setHTML only that.
Any help I would be very grateful.
P:S: It's a freebie for Joomla...
Have developed a Joomla AJAX search module for VirtueMart .
Works fine in everything except IE.
I know the reason is IE's limitation in innerHTML (block level html not allowed in inline)
The problem is the returned html from the AJAX call contains a form so IE throws an error.
To fix it I need to filter out the result before setting the html in the div, in other words select just the elements I need before doing the setHTML.
I've tried everything but I just can't get the syntax right. :chomp:
Here's what I have
Code:
var req = new Ajax(url, { method: 'get', delay : 300, data: { 'option' : 'com_virtuemart', 'page' : 'shop.browse', blah blah },
onComplete: function(results) {
var theNewEle = new Element('div').setHTML(results);
theNewEle.getChildren().each(function(r) {
NEED TO FILTER RESULT HERE to display only the div class="browseProductContainer
$('vmlpsearch_tmpdiv').setHTML(r.innerHTML);
});
the returned html has this structure..
Code:
<table>
<tr>
<td>Form element in here</td>
<td>
<div class="browseProductContainer">Required html</div>
</td>
</tr>
<tr>
repeat above for next result
</tr>
</table>
So what I need to do is target the div class="browseProductContainer and setHTML only that.
Any help I would be very grateful.
P:S: It's a freebie for Joomla...