Detecting selected account

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
 
E

Evertjan.

wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
I realize also that the id may also be passed in through the query
string.

What are you posting about?

Is Sigmund Freud's Id passed away?

[please always quote on usenet]
 
A

aljamala

Evertjan. said:
What are you posting about?

Is Sigmund Freud's Id passed away?

[please always quote on usenet]
The post just above it regarding how to get that ID while switching
account, I remembered something an added it in, I saw no need to
quote..

Does anyone know how to pass in a parameter from ASP to XSL?
 
E

Evertjan.

wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
Evertjan. said:
What are you posting about?

Is Sigmund Freud's Id passed away?

[please always quote on usenet]
The post just above it regarding how to get that ID while switching
account, I remembered something an added it in, I saw no need to
quote..

"The post just above it" is only pertinent to your news reader,
but can be quite another post in another one.

That other post could be not yet or no more be available
on anothers news server.

So your "I saw no need to quote" was a bad sight.
Does anyone know how to pass in a parameter from ASP to XSL?

<% = myParameter %>
 
A

aljamala

"The post just above it" is only pertinent to your news reader,
but can be quite another post in another one.

That other post could be not yet or no more be available
on anothers news server.
OK, here it is again
-----
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


<% = myParameter %>
ummm, no!? thats a response.write
 
E

Evertjan.

Evertjan. wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:


So?

Ah, wait, perhaps you ment ASP.net?

If so Then you are asking in the wrong NG.
 
A

aljamala

Evertjan. said:
Ah, wait, perhaps you ment ASP.net?

If so Then you are asking in the wrong NG.
I don't think so, I think you are just misunderstanding my question. I
want to pass the variable to an XSL stylesheet not for HTML rendering.
 
E

Evertjan.

wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
I don't think so, I think you are just misunderstanding my question. I
want to pass the variable to an XSL stylesheet not for HTML rendering.

Where are you using an .asp page then?

If you want a parameter in ASP it surely must be on an asp page, and that
asp page will send a stream to the user, and that stream contains your
stylesheet, or am I wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top