Results 1 to 3 of 3

Thread: assigning dynamic ID's to objects

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205

    assigning dynamic ID's to objects

    I am trying to assign an ID for an object dynamically using a Javascript.

    My function basically strips out characters i dont want and leaves the important data that i can then use as a unique ID for an object.

    The problem is it never executes my script thus i presume the ID of the object doesnt get set. But why??

    Here is my code:
    Code:
    <DIV ID="'stripBuild('@name')'" STYLE="display:none">
      <xsl:attribute name="ID">
        stripBuild('<xsl:value-of select="@name"/>')
      </xsl:attribute>
      <xsl:apply-templates select="./*"/>
    </DIV>
    As you can see im desperate to set this ID, and have called it twice. But it doesnt get called at all, however, i know its processing these lines because the values are displayed in the browser and if i set STYLE="display:block" it displays what i want to dynamically hide and display when the user clicks.

    Please help.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Neither way interprets what you write as JavaScript.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I recommend a server scripting language like PHP.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width