|
-
Apr 19th, 2005, 09:08 AM
#1
Thread Starter
Hyperactive Member
<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.
-
Apr 19th, 2005, 09:09 AM
#2
Re: ASP.NET (Javascript)
Where have you placed that line of code? Page Load?
-
Apr 20th, 2005, 08:12 AM
#3
Thread Starter
Hyperactive Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|