View Single Post
  #2 (permalink)  
Old Dec 4th, 2007, 03:02
Rakuli's Avatar
Rakuli Rakuli is offline
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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...


Code: Select all
function fnCallback(e) {
           var ok = confirm("Are you welling to continue? ");
			if(ok)
		{	 
                                               // If this is a select change things a bit
                                               if (this.tagName == 'SELECT') 
                                                   window.location.href=this.options[this.selectedIndex].value;
			return true;
		} 
		else
		{
	
	YAHOO.util.Event.preventDefault(e);
	YAHOO.util.Event.stopPropagation(e);
		  return false;
		}
	}
Reply With Quote