Topic: XML Filter (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=22675" title="Pages that link to Topic: XML Filter (Page 1 of 1)" rel="nofollow" >Topic: XML Filter <span class="small">(Page 1 of 1)</span>\

 
FxBrandon
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Jul 2004

posted posted 07-23-2004 10:12

Hi people! I'm trying to investigate the solution to XML Menu but now I have a problem and I don't know what's happening... I want to do a Request.Form from 5 input type text that I create dinamically to filter the results.

<xsl:for-each select="$FilteredFields">

<th>
<input>
<xsl:attribute name="id">txtFilteredField<xsl:value-of select="position()"/></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
</input>
</th>
</xsl:for-each>

But I don't know why the value is always empty, something is wrong but I don't know what.
When I look HTML Code in Explorer I see always :

<th><input id="txtFilteredField1" value=""></input></th>

Any Ideas?

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 07-23-2004 16:57

You need to verify your XML source "$FilteredFields".
Does it truly exist? Are you stepping through it correctly?
Why don't you paste the XML source here so that we can have a look.
Also, above your for-each, you could write the text of this variable to the browser:

<xsl:value-of select="text($FilteredFields)"/>

... and see if something is there.

Karl

FxBrandon
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jul 2004

posted posted 07-27-2004 09:31

XML Looks like This:

<NewDataSet>
<spOrders>
<IdCost>1</IdCost>
<CostCode>2004251</CostCode>
<CostDate>2004-03-30T00:00:00.0000000+02:00</CostDate>
<IdUser>32</IdUser>
<IdDepartment>1</IdDepartment>
<CostDescription>1 CD Exchange 2003</CostDescription>
<OKCAP>-1</OKCAP>
<Report>OK</Report>
<IdOffer>30184</IdOffer>
<OfferDateSeleccion>2004-04-01T00:00:00.0000000+02:00</OfferDateSeleccion>
<ApprovementComission>DA</ApprovementComission>
<ApproveDate>2004-04-01T00:00:00.0000000+02:00</ApproveDate>
<Place>Here</Place>
<AccountNumber>2134532</AccountNumber>
<AccountDescription>Software</AccountDescription>
<Reason>Develop</Reason>
<UserName>James</UserName>
<DepName>Systems</DepName>
<CDate23/03/02</CDate>
</spOrders>
.
.
.
<spOrders>....</spOrders>

</NewDataSet>


Thanks Karls I have take a look and $FilteredFields it's empty because the browser shows nothing.

<xslaram name="FilteredFields" /> But I construct always a Filtered Field something like...

If isFiltered = 1 Then
strSQLFilter = ""
If Not strFilteredFields(1) = "" Then
strSQLFilter = strSQLFilter + " AND IdCost LIKE '%" & strFilteredFields(1) & "%'"
End If
If Not strFilteredFields(2) = "" Then
strSQLFilter = strSQLFilter + " AND CDate = '" & strFilteredFields(2) & "'"
End If
If Not strFilteredFields(3) = "" Then
strSQLFilter = strSQLFilter + " AND CostDescription LIKE '%" & strFilteredFields(3) & "%'"
End If
If Not strFilteredFields(4) = "" Then
strSQLFilter = strSQLFilter + " AND Report LIKE '%" & strFilteredFields(4) & "%'"
End If
If Not strFilteredFields(5) = "" Then
strSQLFilter = strSQLFilter + " AND UserName LIKE '%" & strFilteredFields(5) & "%'"
End If
strSQLFilter = "IdDepartment=" & Session("IdDepartment") & " " & strSQLFilter
Me.ViewState("strSQLFilter") = strSQLFilter
End If

And save it into ViewState Variable...

And strSQLFilter = "IdDepartment=" & Session("IdDepartment") But I still don't know why in the postback the input text is empty...

But there's no matter Karl I will try to solve it because it's a lot of code and I don't want to disturb you more than a simple question because I think it's complicated to solve what is happening here... Thanks for all!



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu