Results 1 to 2 of 2

Thread: little javascript error (Value turns to "false" ?) :Never mind :D

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    little javascript error (Value turns to "false" ?) :Never mind :D

    OK, i have a text box on a form,

    And i want to check if the form's textbox is a valid username, so i check its length & that, using JavaScript, and then if its valid length, i open a "invisible" window, to check if the username is in user, or if it is banned (IE: admin / administrator not allowed)

    any how's, I know that the form's value is being presented to the script properly, as the "alert(namevalue) is givin the propa text input, but the actual window that is opening, is going to &username=false

    Code:
    <script language=javaScript TYPE="text/javascript">
    <!--
    
    function check_username(namevalue){
                    // Returns the actual value
    	alert(namevalue);
                    // if the actual isnt > 2, it will msgbox
    	if(namevalue = "" || namevalue.length < 3){
    		alert("Username must be at least 3 characters long!");
    	}else{
                                    // seams to totally crap out here for some reason?
    		window.open("http://ew-search.realm-ed.co.uk:88/members/register.php?op=check_name&amp;username=" + namevalue, "popupnamecheck", "width=1,height=7,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=1,toolbar=0");
    	}
    }
    // -->
    </script>
    is it something wrong with this code?

    cuz i am at a loss, it was working b4, but suddenly, crap-out-arini

    TA
    Last edited by wpearsall; Dec 20th, 2002 at 11:22 AM.
    Wayne

  2. #2

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    OK, never mind

    Code:
    // this
    	if(namevalue = "" || namevalue
    //needed to be this
    	if(namevalue == "" || namevalue
    (damn double = )
    Wayne

Posting Permissions

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



Click Here to Expand Forum to Full Width