Results 1 to 2 of 2

Thread: using 'this' key word with drop down list in ASPX page

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    66

    using 'this' key word with drop down list in ASPX page

    I have an aspx page. On this page datagrid, the last column of the grid has a drop down list.
    When the user changes the value of the drop down list I want an event to fire in javascript.

    my code behind file has the following code in the itemdatabound event:
    Cbo.Attributes.Add("onchange", "SelectedPremium( this );")
    When the event fires I get the following error message:Microsoft JScript runtime error: Object expected

    The 'This' key word does not want to work. How can I dynamcially reference the control since I won't know the name until the form is rendered on the users screen?

    Thank you for your assistance.
    Jason Meckley
    Database Analyst
    WITF

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    66
    I found the error. The header did not contain the link to the js file. No javascript was working on the form!
    Jason Meckley
    Database Analyst
    WITF

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