/    Sign up×
Community /Pin to ProfileBookmark

Import XML Safari

Hello all,
I’m new so please be gentle. I have a JS script that imports XML and it works in IE, Firefox… but I’m having trouble getting it to work in Safari. I was wondering if someone could help me do this? below is the import code I have so far:

[CODE]var xmlDoc;
function loadXML() {

if (window.ActiveXObject) {
xmlDoc=new ActiveXObject(“Microsoft.XMLDOM”);
xmlDoc.async=false;
xmlDoc.load(“gallery.xml”);
firstLoad();
}

else if (document.implementation && document.implementation.createDocument) {
xmlDoc=document.implementation.createDocument(“”,””,null);
xmlDoc.load(“gallery.xml”);
xmlDoc.onload=firstLoad;
} else {
alert(‘Your browser cannot handle this script’);
}
}[/CODE]

Any help would be great. Thanks.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @bpdp 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.24,
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,
)...