Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

XML question

  • 18-11-2005 05:08PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 2,203 ✭✭✭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, Registered Users 2 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, Registered Users 2 Posts: 2,203 ✭✭✭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