Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListF&L/UDT Search with Drop-Down ListsF&L/UDT Search with Drop-Down Lists
Previous
 
Next
New Post
12/4/2011 10:51 PM
 

Thanks for the examples Mike and Brandon. In these examples, instead of clicking a submit button, can I make the drop down list postback?

 
New Post
12/5/2011 1:17 AM
 
Brandon Jelinek wrote:
and then my filter statement is I know i am missing the searchPostback2 in both the filter and the search parameter but what is the syntax for adding in that 2nd filter element?

Hi. I've just figured out how to add the second filter element. First add another variable similar to "search" (eg. search2):

<xsl:variable name="prefix_param">udt_<xsl:value-of select="//udt:Context/udt:ModuleId" />_paramxsl:variable>
  <xsl:param name="param_search" />
  <xsl:param name="param_searchpostback" />
  <xsl:param name="param_searchpostback2" />
  <xsl:param name="param_ispostback" />
  <xsl:key name="LessonLevel" match="udt:Data" use="udt:Lesson_Level" />
  <xsl:key name="ModuleUsed" match="udt:Data" use="udt:Module" />
  <xsl:variable name="search">
    <xsl:choose>
      <xsl:when test="$param_ispostback">
        <xsl:value-of select="$param_searchpostback" />
      <xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$param_search" />
      <xsl:otherwise>
    <xsl:choose>
  <xsl:variable>
  <xsl:variable name="search2">
    <xsl:choose>
      <xsl:when test="$param_ispostback">
        <xsl:value-of select="$param_searchpostback2" />
      <xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$param_search" />
      <xsl:otherwise>
    <xsl:choose>
  <xsl:variable>

Then find the select statement which "search" is used in, and edit.

<xsl:variable name="currentData" select="udt:Data[(contains(*[name()=$searchColumns][1],$search) or contains(*[name()=$searchColumns][2],$search) or contains(*[name()=$searchColumns][3],$search) or contains(*[name()=$searchColumns][4],$search) or contains(*[name()=$searchColumns][5],$search)) and (contains(*[name()=$searchColumns][1],$search2) or contains(*[name()=$searchColumns][2],$search2) or contains(*[name()=$searchColumns][3],$search2) or contains(*[name()=$searchColumns][4],$search2) or contains(*[name()=$searchColumns][5],$search2))]" />

<xsl:variable name="currentData" select="udt:Data[(contains(*[name()=$searchColumns][1],$search) or contains(*[name()=$searchColumns][2],$search) or contains(*[name()=$searchColumns][3],$search) or contains(*[name()=$searchColumns][4],$search) or contains(*[name()=$searchColumns][5],$search)) and (contains(*[name()=$searchColumns][1],$search2) or contains(*[name()=$searchColumns][2],$search2) or contains(*[name()=$searchColumns][3],$search2) or contains(*[name()=$searchColumns][4],$search2) or contains(*[name()=$searchColumns][5],$search2))]" />

 
New Post
12/9/2011 10:47 PM
 
HCl aq wrote:

Thanks for the examples Mike and Brandon. In these examples, instead of clicking a submit button, can I make the drop down list postback?

 So, this module only support searches via a submit button?

 
New Post
12/13/2011 7:12 AM
 

Just found out that only a few modifications can make the dropdownlist automatically postback. Add an onchange attribute to it and set "selected" for the current option being searched.

<xsl:template name="SearchForm">
  Search by Year:
  <select name="{$prefix_param}_searchPostback" onchange="this.form.submit();">
    <option value="">ALL</option>
    <xsl:for-each select="udt:Data[count(. | key('data-by-Year', substring(udt:Date,1,4))[1]) = 1]">
      <xsl:sort select="substring(udt:Date,1,4)" order="descending" />
      <xsl:choose>
        <xsl:when test="substring(udt:Date,1,4)=$search">
          <option selected="selected"><xsl:value-of select="substring(udt:Date,1,4)"/></option>
        </xsl:when>
        <xsl:otherwise>
          <option><xsl:value-of select="substring(udt:Date,1,4)"/></option>
        </xsl:otherwise>
      </xsl:choose>
     </xsl:for-each>
   </select>
    <!--<input type="submit" name="go" value="{//udt:Context/udt:LocalizedString_Search}" />-->
    <input type="hidden" name="{$prefix_param}_ispostback" value="true" />
  </xsl:template>
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListF&L/UDT Search with Drop-Down ListsF&L/UDT Search with Drop-Down Lists


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out