Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Learn More

createDom not working in lastes verion of Firefox

  • 1 απάντηση
  • 1 έχει αυτό το πρόβλημα
  • 7 προβολές
  • Τελευταία απάντηση από scott.a.mckinstry

more options

createDOM does not work with the latest version of Firefox.

My code is below.

function showPartInfo(partref)
{

var partbase = createDOM("partbase.xml");
   
    if (top.IE5plus) {
        var element = partbase.selectSingleNode("//partinfo[@partref='" + partref + "']");
    } else {
        // since 'selectSingleNode' is not available in the mozilla dom,
        // we have to track down the node the long way
        var element = null;
        // the alert is needed in FireFox to add a small delay while the partbase is searched, with out this the function does not work
        alert("Searching, Press OK to Continue...");
        var parts = partbase.getElementsByTagName("partinfo");
        for (i = 0; i < parts.length; i++) {
            if (parts[i].getAttribute("partref") == partref) element = parts[i];
        }
    }

    if(element != null)
    {
        partinfo = element;
        popup = window.open("../../other/partform.html", "popup", "resizable=yes,width=600,height=180,scrollbars=yes");
       	popup.focus();
    }
    else 
    	alert("Sorry, the RPSTL contains no part information for the item you have selected.");
}
createDOM does not work with the latest version of Firefox. My code is below. <pre><nowiki>function showPartInfo(partref) { var partbase = createDOM("partbase.xml"); if (top.IE5plus) { var element = partbase.selectSingleNode("//partinfo[@partref='" + partref + "']"); } else { // since 'selectSingleNode' is not available in the mozilla dom, // we have to track down the node the long way var element = null; // the alert is needed in FireFox to add a small delay while the partbase is searched, with out this the function does not work alert("Searching, Press OK to Continue..."); var parts = partbase.getElementsByTagName("partinfo"); for (i = 0; i < parts.length; i++) { if (parts[i].getAttribute("partref") == partref) element = parts[i]; } } if(element != null) { partinfo = element; popup = window.open("../../other/partform.html", "popup", "resizable=yes,width=600,height=180,scrollbars=yes"); popup.focus(); } else alert("Sorry, the RPSTL contains no part information for the item you have selected."); }</nowiki></pre>

Τροποποιήθηκε στις από το χρήστη cor-el

Όλες οι απαντήσεις (1)

more options

The last version of Firefox where createDOM worked was 68.12