Odd clientID behaviour

Discussion in 'ASP .Net' started by John, Aug 20, 2003.

  1. John

    John Guest

    Hi all,

    I have a user control which I need tor eference in a javascript function on
    the client. What I do is to sedn the name of that control down to the client
    in a variable and the javascript function uses that variable to get the
    element.

    Now in my Page_Load event, I get the clientID of the control (an image
    control) and put this into a variable. The value of this in debug is
    "_ctl3_UCNutrients_imgNutritional". The javascript is not finding the
    element because if I view the source, the value is rendered as
    "_ctl4_UCNutrients_imgNutritional". Whay is this happening? How do I fix it?

    Regards
    John.
     
    John, Aug 20, 2003
    #1
    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. Maras
    Replies:
    1
    Views:
    3,131
    Cowboy \(Gregory A. Beamer\)
    Oct 15, 2003
  2. =?Utf-8?B?ZGhucml2ZXJzaWRl?=

    39th month? Odd DateTime behaviour!

    =?Utf-8?B?ZGhucml2ZXJzaWRl?=, Sep 2, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    478
    =?Utf-8?B?ZGhucml2ZXJzaWRl?=
    Sep 3, 2005
  3. Peter Charles

    Odd behaviour of link colours?

    Peter Charles, Jan 27, 2004, in forum: HTML
    Replies:
    1
    Views:
    480
    Mark Parnell
    Jan 27, 2004
  4. Kulgan

    aspnet_compiler Odd Behaviour?

    Kulgan, Jul 21, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    404
    Kulgan
    Jul 21, 2006
  5. Michael Speer

    Odd behavior with odd code

    Michael Speer, Feb 16, 2007, in forum: C Programming
    Replies:
    33
    Views:
    1,105
    Richard Heathfield
    Feb 18, 2007
Loading...

Share This Page