Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Can someone point out how to i get to trigger a link to a node when selecting the value from a drop down list. I actually have a select drop down list where i populate a list of node.
<select name="tourism" id="test"> <option value="0">Please Choose</option> <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']"> <option value="{@id}"> <xsl:value-of select="@nodeName"/> </option> </xsl:for-each></select>
//fuji
You would need to use some javascript. Here is a quick example using some jquery (not tested)
<select id="test" onChange="redir($('#test option:selected').attr('value'));"> <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']"> <option value="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </option> </xsl:for-each></select>
<script type="text/javascript">function redir(rpath) { location = rpath;}</script>
Here's also another example of the same thing on Tim's blog, using old schema and jquery-less: http://www.nibble.be/?p=32
-Tom
Hey Tom,
Thanks for the response. I got it working like this as well
<select name="tourism" id="test" onChange="window.open(this.options[this.selectedIndex].value,'_self')"> <option value="/">Please Choose</option> <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']"> <option value="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </option> </xsl:for-each></select>
But thanks
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to trigger a value in dropdown list
Can someone point out how to i get to trigger a link to a node when selecting the value from a drop down list. I actually have a select drop down list where i populate a list of node.
//fuji
You would need to use some javascript. Here is a quick example using some jquery (not tested)
Here's also another example of the same thing on Tim's blog, using old schema and jquery-less: http://www.nibble.be/?p=32
-Tom
Hey Tom,
Thanks for the response. I got it working like this as well
But thanks
//fuji
is working on a reply...