Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4006594
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:32:00+00:00 2026-05-20T08:32:00+00:00

this is a partial code: function readXmlUsingXPath(i,guid, xpath) { var xmlDoc = loadXML(gameFeed.aspx?guid= +

  • 0

this is a partial code:

function readXmlUsingXPath(i,guid, xpath) {
    var xmlDoc = loadXML("gameFeed.aspx?guid=" + guid);
    if (xmlDoc == null) { document.getElementById(guid).innerHTML = "UPDATING"; return }
    else { };
    i.innerHTML = xmlDoc.selectNodes(xpath)[0].text;
}

window.onload = function () {
    for (var i = 0; i < document.getElementsByTagName('jackpot').length; i++) {
        var guid = document.getElementsByTagName('jackpot')[i].getAttribute('data-g').split('|')[0];
        var xpath = document.getElementsByTagName('jackpot')[i].getAttribute('data-g').split('|')[1];
        readXmlUsingXPath(document.getElementsByTagName('jackpot')[i],guid, xpath);
    }
}

basicly, what i want to do is pass the element from the onload function, to the readXmlUsingXpath function, so i could change it.
but i get an unknown runtime error…

as asked, some sample html:

<li>
<a href="/gamepath/"><span>gameTitle</span>
<span><jackpot data-g="<%=game.Guid %>|<%=game.GamingProperties.JackpotFeedXpath %>">UPDATING . . .</jackpot></span>
</a>
</li>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:32:01+00:00Added an answer on May 20, 2026 at 8:32 am

    ok, so i modified the code a bit,
    and made it simpler.

    now it works as its supposed to.

    function loadXMLDoc(guid,xpath,i) {
    
        var xmlhttp;
        if (window.XMLHttpRequest) {xmlhttp = new XMLHttpRequest();}
        else {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
        xmlhttp.async = true;
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                i.innerHTML = xmlhttp.responseXML.selectNodes(xpath)[0].text;
            }
        }
        xmlhttp.open("GET", "gameFeed.aspx?guid=" + guid, true);
        xmlhttp.send();
    }
    
    var tags = document.getElementsByTagName("pre");
    for (var i = 0; i < tags.length; i++) {
        var data = tags[i].getAttribute('data-g').split('|'), guid = data[0], xpath = data[1];
        loadXMLDoc(guid,xpath,tags[i]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a simplified partial version of my code to demonstrate the issue: function
Inside my Model i have this code, this is partial code protected function afterFind
This is some partial code , after a call to a function . movl
With this code: public partial class Form1 : Form { private static readonly int
Here is my code: partial void OnisApprovedChanging(bool value) { this.dateApproved = DateTime.Now; } 'dateApproved'
I've got the following (partial) code: $(#input1, #input2).autocomplete({ source:function( request, response ) { ...
I have an aspx page with the following code (partial and simplified): (beginning of
I came across the following code: var f = function () { var args
This is my partial code: if(action==auth) { myfile.open(account.txt); while(!myfile.eof()) { getline(myfile,sline); vector<string> y =
I'm using this: http://docs.jquery.com/UI/Autocomplete I'm initializing a text box like this (partial code): $('#foo').autocomplete

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.