PC Nerd Posted January 8, 2007 Share Posted January 8, 2007 i have 2 quick questions1.) what would i compare to in this if condition, when testing to see if the email field has an @ symbol, and one "."? if ( Email !=#Help Here#) { alert.......} would it be "!= *@*.*" ???and 2.) ok, i have this script: B_A-New_Player_Valid.js and when i include it into my <head> of my html, it like blocks the css indluded file. becauase all the color defined by the css script goes from the page. why is this happening???, and what can i do to stop it.....????here is the codefor both of the bove questions.:[code]function New_Player_Valid() {User_Name = window.document.B_A-New_Player.User_Name.valuePassword = window.document.B_A-New_Player.Password.valueRe_Password = window.document.B_A-New_Player.Re_Password.valueEmail = window.document.B_A-New_Player.Email.valueRe_Email = window.document.B_A-New_Player.Re_Email.valueF_Name = window.document.B_A-New_Player.F_Name.valueL_Name = window.document.B_A-New_Player.L_Name.valueAge = window.document.B_A-New_Player.Age.valueT+C = window.document.B_A-New_Player.T+C.valueP+P = window.document.B_A-New_Player.P+P.valueif (Password != Re_Pasword){alert("Your Passwords DO NOT Match. Please change them so that they match");}else if (Email != Re_Email){alert("Your Emails DO NOT Match. Please change them so that they match");}else if (T+C.checked != TRUE) {alert("You have not read the Terms and Conditions. Please read the Terms and Conditions and then check the box");}else if (P+P.checked != TRUE) {alert("You have not read the Privacy Policy. Please read the Privacy Policy and then check the box");}else if (User_Name.length < 4) {alert("Your User Name is less than 4 characters in length. Please make your User Name between 4 and 14 characters in length");}else if (User_Name.length > 14){alert("Your User NAme is more than 14 characters in length. Please make your User Name between 4 and 14 characters in length");}else if () {}}[/code][code]<html><head><script language = "JavaScript" type = "text/Javascript" href = "JavaScript/B_A-New_Player_Valid.js"></script><link rel="stylesheet" type="text/css" src="B_A-CSS.css"><title>Battle Ages New Player</title></head>[/codei really appreciate your help, thank you in advance[/code] Quote Link to comment Share on other sites More sharing options...
fenway Posted January 8, 2007 Share Posted January 8, 2007 1) You need to use a regex match.2) JS and CSS have nothing to do with one another. There's something else going on. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted January 8, 2007 Author Share Posted January 8, 2007 ok, thanks, do you have any idea what might be going on...???could you give me a pointer in the right direction ie csome code to work with, for my 1st question Quote Link to comment Share on other sites More sharing options...
fenway Posted January 9, 2007 Share Posted January 9, 2007 1) there are plenty of resources of JS regex matching... anything specific?2) Make sure your CSS validates, something as simple as a missing close could break the markup. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.