SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Return false fails

    My return falses aren't working. Happen to know why?

    Code JavaScript:
     
    var drop_selected = document.getElementsByName('search_category');
    	for (var x in drop_selected) {
    		drop_selected[x].onclick = function(){
    			or (var c=0; c<drop_selected.length; c++) { 
    				drop_selected[c].setAttribute("class", ""); 
    				return false;
    			}
    			this.setAttribute("class", "drop_selected");
    			return false;
    		}
    	}

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,097
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Try for instead of or
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ScallioXTX View Post
    Try for instead of or
    Thank you! So dumb!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •