Results 1 to 5 of 5

Thread: JavaScript and ASP.NET Server Control

  1. #1

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    JavaScript and ASP.NET Server Control

    Hello everybody,

    I have a TextBox server control and I need to set the text using JavaScript. I am using following code but this doesnt work for me.

    Code:
    document.getElementById("daysTextBox").value = "Some Text";

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: JavaScript and ASP.NET Server Control

    This line looks fine, I think you need to look elsewhere for the issue - is the javascript procedure this line is contained within, being called & executed properly? Does the final HTML list this control daysTextBox with an Id attribute in it's tag?

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: JavaScript and ASP.NET Server Control

    How are you running it? Adding an attribute to some existing element?

  4. #4

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: JavaScript and ASP.NET Server Control

    This statement is written in a function and the function is executed on onChange of a DropDown.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: JavaScript and ASP.NET Server Control

    I didn't understand that. Show all relevant code.

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