Undskyld jeg forstyrrer igen. Nu har jeg siddet hele dagen uden at have fundet en løsning. Jeg håber ikke der er nogen der bliver irriterede over, at jeg poster hele scriptet, men her er det:
<!-- PleaseTell Script by JND Technologies, 16th December 2002 -->
<!-- Pls visit
www.jnd.bz or email us : web@jnd.bz -->
<!-- PLS DO NOT REMOVE THIS NOTICE -->
<!-- #include file="config.asp" -->
<style>
body,td{font-family:verdana,arial;font-size:9pt}
</style>
<title>
<%=PageTitle%>
</title>
<SCRIPT LANGUAGE="JavaScript" src="Documents%20and%20Settings/alexisn/My%20Documents/jobmakers/asp/email.js">
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Check()
{
var formObj;
formObj = document.webform.Name;
if(formObj.value=="")
{
alert("Enter your name");
formObj.focus();
return false;
}
formObj = document.webform.Email;
if(formObj.value=="")
{
alert("Enter your E-mail address");
formObj.focus();
return false;
}
else
{
if(!emailCheck(formObj.value))
{
formObj.focus();
return false;
}
}
formObj = document.all("f") ;
if(formObj.length)
{
for(i=0;i<formObj.length;i++)
{
if(formObj[i].value=="")
{
alert("Enter your friends E-mail address");
formObj[i].focus();
return false;
}
else
{
if(!emailCheck(formObj[i].value))
{
formObj[i].focus();
return false;
}
}
}
}
else
{
if(formObj.value=="")
{
alert("Enter your friends E-mail address");
formObj.focus();
return false;
}
else
{
if(!emailCheck(formObj.value))
{
formObj.focus();
return false;
}
}
}
}
function createForm(number) {
data = "";
inter = "'";
if (number < 16 && number > -1) {
for (i=2; i <= number; i++) {
if (i < 10) spaces=" ";
else spaces=" ";
data = data + "Friend " + i + " :" + spaces + "<input type='text' size=35 name='f'><br>";
}
if (document.layers) {
document.layers.cust.document.write(data);
document.layers.cust.document.close();
}
else {
if (document.all) {
cust.innerHTML = data;
}
}
}
else {
window.alert("Please select up to 15 entries.");
}
}
// End -->
</script>
<h2 align="center"><%=PageHeader%></h2>
<%
If Request.Form("name")="" then
%>
<form name=counter>
<div align="center">
<table width="60%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000066" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#99ccff">
<tr>
<td align="center"><b>Number of Emails to send to</b>:
<select name="number">
<option value="1" SELECTED>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
</select>
<input type=button value="Update" onClick="createForm(counter.number.value);" name="button" class="but">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</form>
<form action="index.asp" method="POST" name="webform" onsubmit="return Check();">
<table width="60%" align="center" bgcolor="#333333" cellspacing="1" cellpadding="0">
<tr><td>
<table width="100%" align="center" cellpadding="2" cellspacing="0" bgcolor="#99ccff">
<tr>
<td align="center"><b>Your Name</b>:
<input name="Name" type="text" id="Name" size="35"></td>
</tr>
<tr>
<td align="center"><b>Your Email</b>:
<input type="text" name="Email" size="35"></td>
</tr>
<tr valign="bottom">
<td align="center" height="31"><b>Enter in their Email ID's</b></td>
</tr>
<tr><td></td></tr>
<tr><td align="center"><b>Friend 1</b> : <input type="text" name="f" size="35"><br>
<span id="cust" style="position:relative;"></span>
</td></tr>
<tr><td align="center"><br><b>Your Message</b>:<br><textarea name="Message" cols="35" rows="5"><%=PreMessage%></textarea></td></tr>
<tr align="center">
<td> <input type="submit" name="sub" value=" Send " class="but"></td>
</tr>
</table>
</td></tr></table>
</form>
<div align="center"><font size="-2">Powered by <a href="
http://www.awb.net">AWB Web Services</a> Copyright 2003</font></div>
<%
else
If Request.form("Name")="" then error("Name")
If Request.form("Email")="" then error("Email")
Response.Write "<h3 align='center'>Thank you for your referral.</h3>"
dim message,fromEmail,toEmail
message = Request.Form("message")
fromEmail = Request.Form("Email")
dim myMail
count = Request.Form("f").Count
mainSend = "Mails Send To" & "<BR>"
for i= 1 to count
set myMail = server.CreateObject("CDONTS.Newmail")
toEmail= Request.Form("f")(i)
mainSend =mainSend & toEmail & "<BR>"
myMail.Body= message
myMail.To= toEmail
myMail.From= fromEmail
myMail.Subject = Subject
myMail.Send
next
set myMail= nothing
set myMail = server.CreateObject("CDONTS.Newmail")
if MailToMe<>"" then
myMail.Body = mainSend
myMail.To=toEmail
myMail.From = fromEmail
myMail.Subject ="Please Tell"
'myMail.Send
end if
end if
%>