Carrying the Nats Variable in XSL - Javascript Gurus Please Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Big_D
    CRAZY MOFUKKA
    • Jun 2006
    • 3296

    #1

    Carrying the Nats Variable in XSL - Javascript Gurus Please Help

    Ok, so I have learned xsl over the last few weeks and I am putting a new tour together that utilizes xsl for the themeing engine. XSL is a client side programming language where php is a server side programming language. With that being said, I am having a difficult time finding the right javascript to carry the variable from the nats url to my links within the tour. Anyone got a resolution for this?

    For those of you who are going to tell me to allow php to be run on my xsl documents, that has already been approached. Doesn't work......

    I am all ears and thanks for your time guys.....
  • TheDoc
    Too lazy to set a custom title
    • Jul 2001
    • 13827

    #2
    The xml file, should really be a php file.. just named .xml

    You can set that in your htaccess file with this.
    Code:
    Options -indexes
    <Files xml>
    ForceType application/x-httpd-php
    </Files>
    Then you can do your code, and spit the proper header content-type out. Allowing you to start and stop the needed php in the xml for the nats strings, or anything else code wise you want to do.
    ~TheDoc - ICQ7765825
    It's all disambiguation

    Comment

    • Big_D
      CRAZY MOFUKKA
      • Jun 2006
      • 3296

      #3
      Originally posted by TheDoc
      The xml file, should really be a php file.. just named .xml

      You can set that in your htaccess file with this.
      Code:
      Options -indexes
      <Files xml>
      ForceType application/x-httpd-php
      </Files>
      Then you can do your code, and spit the proper header content-type out. Allowing you to start and stop the needed php in the xml for the nats strings, or anything else code wise you want to do.
      no go man.....

      tour pages are encoded .php files, template files are .xsl files used by the system, cool if i hit you up on icq?

      Comment

      • brandonstills
        Confirmed User
        • Dec 2007
        • 1964

        #4
        XSL is not a client side language. It can be run anywhere. It's homoiconic so you can even run XSL in XSL.

        Brandon Stills
        Industry and programming veteran
        [email protected] | skype: brandonstills | ICQ #495-171-318

        Comment

        • tical
          Confirmed User
          • Feb 2002
          • 6504

          #5
          Code:
          <script>
          function getQueryVariable(variable) {
            var query = window.location.search.substring(1);
            var vars = query.split("&");
            for (var i=0;i<vars.length;i++) {
              var pair = vars[i].split("=");
              if (pair[0] == variable) {
                return pair[1];
              }
            }
            alert('Query Variable ' + variable + ' not found');
          }
          </script>
          112.020.756

          Comment

          • tical
            Confirmed User
            • Feb 2002
            • 6504

            #6
            oh btw, for all the coders out there...

            www.experts-exchange.com is the best thing since sliced bread for when you get stuck on a problem
            112.020.756

            Comment

            Working...