0

I need some help with my js file. I an using a bit of javascript to show some xml on a page and I need to reference the right xml file according to the page that it is on. e.g.

<script>
xml=loadXMLDoc("product.xml");
</script>

I have the all the xml files named as different products and have printed out the reference to the xml on the page that it should be on

<div id="product">/xmlfolder/item001.xml</div>

What I need to do is somehow reference the path on the page to the javascript. Is this possible?

Thanks

1 Answer 1

1

Do you mean

xml=loadXMLDoc(document.getElementById('prodct').innerHTML);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.