/    Sign up×
Community /Pin to ProfileBookmark

FireFox imports only as XML

Guys,
I hope that you all can help me with this. I’m not sure what I am missing, but maybe you guys can give me a little direction.

I have a web app that I am building using AJAX and PHP. It uses several different “dialog boxes” such as a Customer Search box, Item Search box, etc. These dialog boxes are DIV elements that I am importing on the fly from external files so that the user won’t have to wait forever for the page to load initially. I am using Sarissa to handle the cross-browser loading of the document.

The current code I have is as follows:

Code:
data = Sarissa.getDomDocument(“dialogs/customer_search.php”, “data”);
data.async = false;
data.load(“dialogs/customer_search.php”);
document.getElementById(‘customerSearch’).appendChild(document.importNode(data.getElementsByTagName( ‘div’)[0], true));

Now crazily enough, this works great in IE7. The dialog box opens and displays without any problem. However when I try this in FireFox, it seems like it is only adding the info as XML. It isn’t adding it as actual HTML nodes. (Not sure about the terminology here. If I need to explain further, I’ll try.) Anyone have any great ideas on how to force Firefox to recognize the node that I am importing as HTML?

Thanks for the help!

Mitchell Killian (II Cor. 12:9)
Integrity Design and Coding
[url]http://www.integritydc.net[/url]
“Except a man be born again, he cannot enter into the kingdom of heaven.” John 3:3

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @mitchkill spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...