17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 965 Views |
-
setting selected attribute for an <option>

7 October 2008 at 9:55am
I'm trying to build a <select> manually with all of the children of a certain page. The code looks like:
<% control ChildrenOf(case-studies) %>
<% if ClassName = RedirectorPage %>
<option value="$ContentSource.Link">$Title</option>
<% end_if %>
<% end_control %>How can I set the selected attribute if the current page is a child of the page being use for the <option>?
-
Re: setting selected attribute for an <option>

7 October 2008 at 10:37am Last edited: 7 October 2008 10:37am
<% control ChildrenOf(case-studies) %>
<% if ClassName = RedirectorPage %>
<option value="$ContentSource.Link"<% if LinkOrSection = section %> selected="selected"<% end_if %>>$Title</option>
<% end_if %>
<% end_control %>Should do it.
-
Re: setting selected attribute for an <option>

8 October 2008 at 4:20am
worked perfectly! thank you!
| 965 Views | ||
|
Page:
1
|
Go to Top |

