A
aljamala
Hi,
I am looking for different ways this can be accomplished, I can think
of a way, but I'm not too happy with it...
The Problem: Users with multiple accounts can switch between them;
however, the selected account is highligted by adding an invalid
"udb_id" attribute to the <tr> tag and replacing that tag with the
color that we want
<tr onmouseover="highlight('on', this);" onmouseout="highlight('off',
this)" udb_id="#############">
to
<tr onmouseover="highlight('on', this);" onmouseout="highlight('off',
this)" bgcolor='#ffe4b5'>
using XSL style sheet
<code>
strHTML = TransformXML(Session("User_Profile"),
"xsl/AccountProfile.xsl")
If strHTML <> "" Then
strHTML = Replace(strHTML, strSearchAccount, "<img alt=''
src='images/red_arrow.gif' width='10' height='10'>")
strHTML = Replace(strHTML, strSearchBGColor,
"bgcolor='#ffe4b5'")
</code>
XSL snippet is below
<tr onmouseover="highlight('on', this);" onmouseout="highlight('off',
this)">
<xsl:attribute name="udb_id"><xsl:apply-templates
select="udb-id|ccex-id|portfolio-id|infolease-id"/><xsl:value-of
select="program-type"/></xsl:attribute>
<td valign="middle"><img alt="" src="/images/spacer.gif"
width="3" height="1"/><xsl:comment><xsl:apply-templates
select="udb-id|ccex-id|portfolio-id|infolease-id"/><xsl:value-of
select="program-type"/></xsl:comment></td>
Now, I want the page to be HTML 4.01 compliant and hence, remove the
udb_id attribute.
I've thought of adding a comment with the udb_id beside the <tr> tag
and replace it with what i want upon selection (ie remove comment and
end of <tr> tag and add in gbcolor), but I dont really like that
solution.
Can anyone recommend something better? I still need to use the XSL on
my XML-like session profile...
Cheers
I am looking for different ways this can be accomplished, I can think
of a way, but I'm not too happy with it...
The Problem: Users with multiple accounts can switch between them;
however, the selected account is highligted by adding an invalid
"udb_id" attribute to the <tr> tag and replacing that tag with the
color that we want
<tr onmouseover="highlight('on', this);" onmouseout="highlight('off',
this)" udb_id="#############">
to
<tr onmouseover="highlight('on', this);" onmouseout="highlight('off',
this)" bgcolor='#ffe4b5'>
using XSL style sheet
<code>
strHTML = TransformXML(Session("User_Profile"),
"xsl/AccountProfile.xsl")
If strHTML <> "" Then
strHTML = Replace(strHTML, strSearchAccount, "<img alt=''
src='images/red_arrow.gif' width='10' height='10'>")
strHTML = Replace(strHTML, strSearchBGColor,
"bgcolor='#ffe4b5'")
</code>
XSL snippet is below
<tr onmouseover="highlight('on', this);" onmouseout="highlight('off',
this)">
<xsl:attribute name="udb_id"><xsl:apply-templates
select="udb-id|ccex-id|portfolio-id|infolease-id"/><xsl:value-of
select="program-type"/></xsl:attribute>
<td valign="middle"><img alt="" src="/images/spacer.gif"
width="3" height="1"/><xsl:comment><xsl:apply-templates
select="udb-id|ccex-id|portfolio-id|infolease-id"/><xsl:value-of
select="program-type"/></xsl:comment></td>
Now, I want the page to be HTML 4.01 compliant and hence, remove the
udb_id attribute.
I've thought of adding a comment with the udb_id beside the <tr> tag
and replace it with what i want upon selection (ie remove comment and
end of <tr> tag and add in gbcolor), but I dont really like that
solution.
Can anyone recommend something better? I still need to use the XSL on
my XML-like session profile...
Cheers