I'm desperately trying to finish of a site for my writers club and I know nothing about programing only got as far as I have care of WYSIWYG program.

Anyway I want to insert a series of forms in one of the pages giving random Male Names, Female Names, Places, Events. With a little help I designed a form which let me pick random first names. I called this form 'Form1.' I then thought if I duplicated that form that I could just change the Male Names to Female Names - why was I so stupid - both boxes showed Female Names.

Anyway I'm not a programer, all I'm interested in doing is putting this particular bit of our site together. I really would appreciate some help.

Here is what I have so far.

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}


function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}


function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<body bgcolor="#FFFFFF" onLoad="MM_preloadImages('../network%20images/about_f2.gif','../network%20images/marketing_f2.gif','../network%20images/comp_f2.gif','../network%20images/library_f2.gif','../network%20images/try_f2.gif','../network%20images/contacts_f2.gif')">
<div id="Layer3" style="position:absolute; left:10px; top:78px; width:200px; height:160px; z-index:3">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form name="Form1" method="get" action="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script  type="text/JavaScript">
fnames=["male1","male2","male3","male4","male5","male6"];
function getRandomFromArrays(){var a=arguments,aa=a.length,tmp=[];
while(aa--){
tmp.push(a[aa][new Date()%a[aa].length])
}
return tmp.reverse();
}
function populateFields(f1,a1){
f1.value=getRandomFromArrays(a1)[0];
}


</script></head>
<body> <Place action="" method="get" name="f">
<p>
<input name="first" type="text">
<p>
<input name="btn" type="button" value="Click" onClick="populateFields(first,fnames)">
</form>
&nbsp;</td>
</tr>
<tr>
<td><form name="Form2" method="get" action="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script  type="text/JavaScript">
fnames=["female1","female2","female3","female4","female5","female6"];
function getRandomFromArrays(){var a=arguments,aa=a.length,tmp=[];
while(aa--){
tmp.push(a[aa][new Date()%a[aa].length])
}
return tmp.reverse();
}
function populateFields(f1,a1){
f1.value=getRandomFromArrays(a1)[0];
}


</script></head>
<body> <Place action="" method="get" name="f">
<p>
<input name="first" type="text">
<p>
<input name="btn" type="button" value="Click" onClick="populateFields(first,fnames)">
</form>
&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</div>
</body>
</html>

Any help would be appreciated
Kevin

Edited 3 Years Ago by Nick Evan: Fixed formatting

This article has been dead for over six months. Start a new discussion instead.