Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

XML question

Options
  • 18-11-2005 5:08pm
    #1
    Registered Users Posts: 597 ✭✭✭


    Hello all,

    I'm trying to display some information thats pulled from an XML page, formatted with an XSL sheet and then pulled into a html page using javascript. I'm using javascript instead of php or asp, as I need to use the script on both a windows and an apache server.

    It works fine locally, but when I upload it to a server, the page is displayed without the XML info and warning that says "error on page".

    Here is my XSL:
    <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
    <html>
    <body>

    <table border="1">
    <tr bgcolor="#B07946">
    <th align="left">Name :</th>
    <th align="left">Buyin :</th>
    <th align="left">Entry Fee :</th>
    <th align="left">Currency : </th>
    <th align="left">State :</th>
    <th align="left">Players :</th>
    <th align="left">Blinds :</th>
    <th align="left">Type :</th>
    <th align="left">Limit :</th>
    <th align="left">Start Time :</th>
    </tr>
    <xsl:for-each select="xmlfeed/tournament">
    <tr>
    <td><xsl:value-of select="name"/></td>
    <td><xsl:value-of select="buyin"/></td>
    <td><xsl:value-of select="entryfee"/></td>
    <td><xsl:value-of select="currency"/></td>
    <td><xsl:value-of select="state"/></td>
    <td><xsl:value-of select="players"/></td>
    <td><xsl:value-of select="blindstructure"/></td>
    <td><xsl:value-of select="type"/></td>
    <td><xsl:value-of select="limit"/></td>
    <td><xsl:value-of select="starttime"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template></xsl:stylesheet>


    Here is part of my XML, which is stored on another server:

    <?xml version="1.0" encoding="utf-8" ?>
    - <xmlfeed>
    - <tournament>
    <tid>10022248</tid>
    <name>Texas Holdem</name>
    <game>Texas Holdem Poker</game>
    <buyin>10</buyin>
    <entryfee>1</entryfee>
    <currency>USD</currency>
    <state>Running</state>
    <players>89</players>
    <blindstructure>Normal NL 1</blindstructure>
    <type>Regular</type>
    <limit>No Limit</limit>
    <starttime>2005-11-18T13:00:00</starttime>
    </tournament>
    .
    .
    .
    - </xmlfeed>


    and here is the javascript that pulls the information into the page:

    <script type="text/javascript">// Load XML
    var xml = new ActiveXObject("Microsoft.XMLDOM")
    xml.async = false
    xml.load("http://serve.bosscasinos.com/poker/pokerTnFeed_dev.asp?productid=3020")// Load XSL
    var xsl = new ActiveXObject("Microsoft.XMLDOM")
    xsl.async = false
    xsl.load("cdcatalog.xsl")// Transform
    document.write(xml.transformNode(xsl))</script>


    Any ideas as to what might be the problem here?

    Thanks folks

    J


Comments

  • Registered Users Posts: 2,157 ✭✭✭Serbian


    yeraulone wrote:
    var xml = new ActiveXObject("Microsoft.XMLDOM")

    You may need to reduce your IE security settings to run the ActiveX on a remote server.


  • Registered Users Posts: 597 ✭✭✭yeraulone


    Serbian wrote:
    You may need to reduce your IE security settings to run the ActiveX on a remote server.

    thanks for the reply Serbian. Do you have any more information about how I go about this?


  • Registered Users Posts: 2,157 ✭✭✭Serbian


    yeraulone wrote:
    thanks for the reply Serbian. Do you have any more information about how I go about this?

    Go to Tools -> Internet Options -> Security. Click on the Trusted Sites (Green Circle with tick) and click the sites button. Add the root url of your remote site to the list (e.g. http://www.yoursite.com/ or else http://1.2.3.4/ if you access via IP). Click ok to all the Windows.


Advertisement