You can also use the form elements array.
var lgn = document.formName.length;
for(var i = 0; i < lgn; i++){
if(document.formName[i].type == "checkbox" && document.formName[i].checked == true){
alert(document.formName[i]+" is checked");
break;
}
}
It will not allow me to put word--word.
Here is the entire page. Try it out -
<HTML>
<HEAD>
<TITLE>Reg Exp</TITLE>
<script type="text/javascript">
/*
No double spaces or double - (" " or "--")
*/
var reg = /[^a-zA-Z\s-]|(\s\s)|(--)/g;
function A(a){
var...
in the popup put-
<body onload = "opener.sendText()">
In the page that opens the popup-
function sendText(){
var statusTxt = "blah";
w.document.open() etc.
function a(){
var letter = "1a";
var n = letter.substr(1,1);
n = n.charCodeAt(0);alert(n);
n++;
n = String.fromCharCode(n);alert(n);
letter = letter.substr(0,1)+n;
alert(letter);
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.