Detecting selected account

Discussion in 'ASP General' started by aljamala@gmail.com, Jan 11, 2007.

  1. Guest

    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
    , Jan 11, 2007
    #1
    1. Advertising

  2. Guest

    I realize also that the id may also be passed in through the query
    string.
    , Jan 11, 2007
    #2
    1. Advertising

  3. Evertjan. Guest

    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]

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 11, 2007
    #3
  4. Guest

    Evertjan. wrote:

    > 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?
    , Jan 11, 2007
    #4
  5. Evertjan. Guest

    wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
    > Evertjan. wrote:
    >
    >> 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 %>



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 11, 2007
    #5
  6. Guest


    > "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



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

    >
    > <% = myParameter %>
    >

    ummm, no!? thats a response.write
    , Jan 11, 2007
    #6
  7. Evertjan. Guest

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

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

    >>
    >> <% = myParameter %>
    >>

    > ummm, no!? thats a response.write
    >


    So?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 11, 2007
    #7
  8. Evertjan. Guest

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

    > wrote on 11 jan 2007 in microsoft.public.inetserver.asp.general:
    >
    >>> > Does anyone know how to pass in a parameter from ASP to XSL?
    >>>
    >>> <% = myParameter %>
    >>>

    >> ummm, no!? thats a response.write
    >>

    >
    > So?
    >


    Ah, wait, perhaps you ment ASP.net?

    If so Then you are asking in the wrong NG.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 11, 2007
    #8
  9. Guest

    Evertjan. wrote:
    > >>> > Does anyone know how to pass in a parameter from ASP to XSL?
    > >>>
    > >>> <% = myParameter %>
    > >>>
    > >> ummm, no!? thats a response.write
    > >>

    > >
    > > So?
    > >

    >
    > 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.
    , Jan 11, 2007
    #9
  10. Evertjan. Guest

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

    >
    > Evertjan. wrote:
    >> >>> > Does anyone know how to pass in a parameter from ASP to XSL?
    >> >>>
    >> >>> <% = myParameter %>
    >> >>>
    >> >> ummm, no!? thats a response.write
    >> >>
    >> >
    >> > So?
    >> >

    >>
    >> 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.


    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?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 12, 2007
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    529
    Knute Johnson
    Oct 11, 2007
  2. nilapenn
    Replies:
    3
    Views:
    603
    Joe Kaplan \(MVP - ADSI\)
    Feb 14, 2005
  3. Replies:
    4
    Views:
    621
    Paul Clement
    Sep 15, 2005
  4. Andy Fish
    Replies:
    1
    Views:
    94
    Csaba Gabor
    Jun 15, 2005
  5. Replies:
    3
    Views:
    193
    Bart Van der Donck
    Jun 30, 2006
Loading...

Share This Page