Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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
  #1 (permalink)  
Old May 10th, 2007, 08:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default onChange event

Hi All,

I am using the "onChange" event in <SELECT> tag.

When I pick the first item in the drop down list, the "onChange" event fires. But if I pick the same item again, it doesn't fire.

I believe this is the normal process.

But, how I can make it work?

Thanks for your help,

<HTML>
<HEAD>
    <script language=javascript>
    function ShowValue()
    {
   alert(form1.DD1.value);
    }

    </script>
</HEAD>

<BODY>

<form name=form1>
    <select name=DD1 onChange="javascript:ShowValue()">
        <option value=1>Item 1</option>
        <option value=2>Item 2</option>
        <option value=3>Item 3</option>
    </select>
</form>

</BODY>
</HTML>
:)

MCinar

Love all the creatures because of the creator.
__________________
MCinar

Love all the creatures because of the creator.
  #2 (permalink)  
Old May 24th, 2007, 06:23 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can try onclick event

Regards,
Rakesh
  #3 (permalink)  
Old May 24th, 2007, 06:28 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

i mean onclick for option tag see the following link

http://www.w3schools.com/tags/tag_option.asp

Regards,
Rakesh
  #4 (permalink)  
Old May 24th, 2007, 08:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks Rakesh. I need something different.

MCinar

Love all the creatures because of the creator.


Similar Threads
Thread Thread Starter Forum Replies Last Post
SqlDependency OnChange Event ghari ASP.NET 2.0 Professional 1 July 30th, 2008 03:01 PM
onChange Event mcinar Javascript 11 May 11th, 2007 09:38 AM
how to use onchange event of dropdownlist check_007 ASP.NET 2.0 Professional 2 February 16th, 2007 02:57 AM
Event:OnChange catchrohith Classic ASP Basics 0 November 3rd, 2006 12:52 AM
OnChange Event Doesn't Execute JLJones13 Javascript How-To 1 August 22nd, 2003 02:15 PM





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