This is a discussion on "[SOLVED] Stop Propagation event after onchange Select!!!!" within the JavaScript Forum section. This forum, and the thread "[SOLVED] Stop Propagation event after onchange Select!!!! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Stop Propagation event after onchange Select!!!!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
[SOLVED] Stop Propagation event after onchange Select!!!!
HI All,
This issue is driving me crazy Actually I want a warning message to appear if I change a select and tell me if I select continue so I can go ahead to the link of in the selected option OR cancel stop the event to go through and keep the previous selected option selected. My code appears down. Actually when I press continue it works fine on the select But the cancel Doesn't it always goes ahead and doesn't stop eventhough i am using the "stopPropagation(e)" method I have include a button and link. The continue and cancel Work fine on those but on change the select the cancel doesn't work Any suggestion and help
|
|
|
|
||||
|
Re: Stop Propagation event after onchange Select!!!!
You could take the onchange= inline event handler away from the <select> element entirely and then add it to the callback function...
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: Stop Propagation event after onchange Select!!!!
Thanks alot Rakuli for your reply,
what you have provide me works but there are two issues still: In my situation I cann't change in the html only I have to change in the javascript and another issue when I change selection and then press Cancel, the selection must go back to its pervious selection.. Again thanks Rakuli for your help Any Other suggestions!!!!! Quote:
|
|
||||
|
Re: Stop Propagation event after onchange Select!!!!
You could do something like adding a new function that will be added on focus, this will store what the currently showing selection is allowing you to change back if necessary.
create a function like
That should do it for you. Cheers,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: Stop Propagation event after onchange Select!!!!
What a Wonderful solution to go back to my pervious selection!!!!!!
Thanks alot Rakuli But I have still the issue of not changing in the html i.e. not to delete "onchange" in the Select tag. Because in my case I have a legacy system and I am only adding javascript code. Again many thanks for your help Quote:
|
|
||||
|
Re: Stop Propagation event after onchange Select!!!!
Set the onchange event handler to nothing before adding the rest
like
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: Stop Propagation event after onchange Select!!!!
What a wonderful job Rakuli I don't know how to thank you, MANY MANY thanks for you help Take Care Quote:
|
|
||||
|
Re: Stop Propagation event after onchange Select!!!!
No problems
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: Stop Propagation event after onchange Select!!!!
Again thanks Rakuli
I still have a tiny issue, I am testing it with IE it work perfect. But when an using the FireFox browser, the on change of the selection won't go back to the pervious selection when I press cancel on the popup message. Many thanks in Advance for any help and suggestion |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Event Chain detection | StanLevin | JavaScript Forum | 4 | Jan 18th, 2008 18:33 |
| [SOLVED] select from array in drop down box | saltedm8 | PHP Forum | 6 | Dec 3rd, 2007 21:08 |
| [SOLVED] hpw to select from 2table using a 3rd | AdRock | Databases | 3 | Nov 16th, 2007 10:20 |
| Dynamic Select Menu with Onchange | pimpmaster | JavaScript Forum | 2 | Jun 18th, 2007 18:11 |
| onchange event and tabbing out of text field ARRRGG | juan110470 | JavaScript Forum | 1 | Dec 7th, 2005 22:55 |