Results 1 to 3 of 3

Thread: <resolved> ASP.NET (Javascript)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    345

    <resolved> ASP.NET (Javascript)

    Hi!

    I am working on an application on asp.net. I want to call a javascript function on the change event of a combo box.

    This is the code I am writing:

    Code:
    cmbState.Attributes.Add("onchange", "ChooseCountry();")
    I have written a javascript function ChooseCountry. The problem is it does not run the first time I click on the combobox. When I click a button, (which loads the same page again), then it starts to function. What could be the reason.?
    Last edited by sinha; Apr 21st, 2005 at 11:21 AM.
    Thanks.

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

    Re: ASP.NET (Javascript)

    Where have you placed that line of code? Page Load?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    345

    Re: ASP.NET (Javascript)

    It works. I was calling the function on the selectedchange event of the combo box..now I call on the Page_Load event..under the block


    Code:
    If Not Page.IsPostBack Then
    
    
    end if
    Thanks.

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