GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Carrying the Nats Variable in XSL - Javascript Gurus Please Help (https://gfy.com/showthread.php?t=877263)

Big_D 12-22-2008 09:47 PM

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 12-22-2008 09:56 PM

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.

Big_D 12-22-2008 10:05 PM

Quote:

Originally Posted by TheDoc (Post 15234933)
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?

brandonstills 12-22-2008 10:08 PM

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

tical 12-22-2008 10:44 PM

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>


tical 12-22-2008 10:45 PM

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 :)


All times are GMT -7. The time now is 03:56 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc