Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2004, 08:39 AM
Authorized User
 
Join Date: Nov 2003
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.NET Dropdownlist

Hi,

Can I make an asp.net dropdown list fire a clientside javascript function upon changing the value from the list followed by a serverside selectedindex_changed event.

I tried giving a onchange() attribute, while Autopostback was true. Only the javascript seems to work, but the postback doesn't happen. Once I remove the attribute, the postback works.

Can't both work one after the other. Something like a button which has its causesvalidation=false & yet it's serverside works after completing its javascript part.

TIA
Praveen

 
Old August 30th, 2004, 08:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

So, you want both a custom Javascript onChange() and OnSelectedIndexChanged to fire or just one?

 
Old August 30th, 2004, 02:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

I don't think both are meant to work together. However, you could have the server side event call a javascript after the server event through Page.RegisterClientScriptBlock, which would execute some javascript code.

Brian
 
Old August 31st, 2004, 12:25 AM
Authorized User
 
Join Date: Nov 2003
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You got me right stu9820, I wanted both the events to fire in succession.

Brian am going to try your suggestion. with the "RegisterClientScriptBlock". Will revert to the forum in case I need further assistance.

TIA
Praveen

 
Old August 31st, 2004, 11:21 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

sorry,this is a wrong post
--------------------------------------------
Mehdi.:)





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 1.1 dropdownlist problem jjduran ASP.NET 2.0 Basics 1 July 16th, 2006 11:11 PM
ASP.NET 1.1 dropdownlist problem jjduran ASP.NET 2.0 Basics 0 July 9th, 2006 07:04 PM
asp.net dropdownlist cena BOOK: Beginning ASP.NET 1.0 0 March 19th, 2006 01:21 AM
DropDownList in ASP.NET shurabhavesh ASP.NET 1.0 and 1.1 Basics 3 June 1st, 2005 09:25 AM
ASP.NET C# Dropdownlist value issue songsan ASP.NET 1.0 and 1.1 Basics 3 January 4th, 2005 08:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.