Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / July 2007



Tip: Looking for answers? Try searching our database.

checkbox listener

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jak9942 - 31 Jul 2007 15:13 GMT
i am using the following script to make a piece of text change when a checkbox
is checked.
How can i make it so that when the checkbox is unchecked the text box says
something different?

checkboxListener = new Object();
checkboxListener.click = function (evt){
    text.text = "Checked"
}
checkbox.addEventListener("click", checkboxListener);
dzedward - 31 Jul 2007 17:14 GMT
..

checkboxListener = new Object();
checkboxListener.click = function(evt) {
    if (text.text == "Checked") {
        text.text = "unChecked";
    } else {
        text.text = "Checked";
    }
};
checkbox.addEventListener("click", checkboxListener);
jak9942 - 31 Jul 2007 17:30 GMT
perfect. Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.