misterpunch
Technical User
Through a little more trial and error I've gotten two parts of my site working, now I just need both sides to talk to each other and my task is complete.
I apologize for I am mostly self taught and I'm probably missing fundamental rules of syntax, but I thought I was pretty close to a solution but I've hit a brick wall. Any guidance would be appreciated.
My goal: To sort a list of pictures by filtering out one category (category element in the XML) the Sorting would happen when a function changed the value of the JavaScript Variable. What I need to do is have the XSL recognize the variable and apply the correct template to filter the list accordingly. Both HTML and XSL are linked to the same external .js file which contains (so far):
when gallery[1] is becomes active I would want this applied:
here is the site again.
I apologize for I am mostly self taught and I'm probably missing fundamental rules of syntax, but I thought I was pretty close to a solution but I've hit a brick wall. Any guidance would be appreciated.
My goal: To sort a list of pictures by filtering out one category (category element in the XML) the Sorting would happen when a function changed the value of the JavaScript Variable. What I need to do is have the XSL recognize the variable and apply the correct template to filter the list accordingly. Both HTML and XSL are linked to the same external .js file which contains (so far):
Code:
var active;
var gallery=new Array();
gallery[0]="nofilter"
gallery[1]="portrait"
gallery[2]="product"
if (active = "null")
{
var active= gallery[0];
}
function test()
{
alert("Variable is currently: " +active );
}
function setValue(id)
{
active = id;
}
when gallery[1] is becomes active I would want this applied:
Code:
<xsl:for-each select="gallery/photo[category='portrait'">
<xsl:sort select="idn" order="descending" />
here is the site again.