Sign in to follow this  

[web] Need some help!

This topic is 3743 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to take care of something for my work, but I don't really understand it. The thing I'm going to write here now is messy and so, but I need to change it into something working.. The thing needs to accept people into their mailing list, so people can get the mailings they sent to everyone.
<html>


<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-store">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<!--mstheme--><link rel="stylesheet" type="text/css" href="_themes/journal/jour1000.css"><meta name="Microsoft Theme" content="journal 1000, default">
</head>
<script language="JavaScript">

<!--

function isEmail(str) {
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}
//-->
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--

function valid(form) {
  var field = form.EmailAdress; // email field
  var str = field.value; // email string
  var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
  var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
  if (!reg1.test(str) && reg2.test(str)) { // if syntax is valid
   // alert("Thank your for your feedback."); // this is optional
    return true;
  }
  alert("Uw e-mail adres is onjuist gespeld!"); // this is also optional
  field.focus();
  field.select();
  return false;
}

// -->
</SCRIPT>

<body style="letter-spacing: 0pt; line-height: 100%; margin-top: 0">
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Op deze pagina kunt U zich 
aanmelden voor het ontvangen</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; van mailings aangaande 
evenementen in onze zaak.</p>
<p>&nbsp;</p>
<form method="POST" name="mailing request" action="handlemail.asp" onSubmit="return valid(this)">  &nbsp;<p>&nbsp;&nbsp;<span style="vertical-align: bottom">
	</span></p>
	<div style="position: absolute; width: 90px; height: 54px; z-index: 4; left: 33px; top: 169px" id="layer4">
		<span style="vertical-align: bottom"> <font size="4">Naam&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</font></span>
	<p><span style="vertical-align: bottom"><font size="4">Adres</font></span></p>
	</div>
	<p><span style="vertical-align: bottom"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></span></p>
	<p><span style="vertical-align: bottom"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</font></span></p>
	<p><span style="vertical-align: bottom"><font size="4">&nbsp;&nbsp;</font></span></p>
	<div style="position: absolute; width: 100px; height: 60px; z-index: 3; left: 31px; top: 253px" id="layer3">
		<span style="vertical-align: bottom"><font size="4">Postcode.Plaats</font></span><p>
		<font size="4"><span style="vertical-align: bottom">Email</span></font></div>
	<p><font size="4"><span style="vertical-align: bottom">&nbsp;&nbsp;</span>&nbsp; </font></p>
	<p><font size="4">&nbsp;</font></p>
	<p>&nbsp;</p>
	<div style="position: absolute; width: 462px; height: 157px; z-index: 1; left: 206px; top: 165px" id="layer1">
		<font size="3"><input type="text" name="naam" size="50" tabindex="1"></font><p>
		<font size="3"><input type="text" name="Adres" size="50" tabindex="2"></font></p>
		<p><font size="3">
		<input type="text" name="postcode" size="6" tabindex="3"></font>
		<font size="3"><input type="text" name="Plaats" size="40" tabindex="4"></font></p>
		<p><font size="3">
		<input type="text" name="EmailAdress" size="50" tabindex="5"></font></p>
		<p>&nbsp;</div>
	<p>&nbsp;</p>
	<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="submit" value="Verstuur" name="B1">&nbsp;
	<input type="reset" value="Opnieuw" name="B2"></p>
	<input type="hidden" name="_mailfrom" value="info@swartsenborgh.nl">
	<!-- DIT IS HET INFO ADRESS OP DE WEBSERVER -->
</form>
<p>&nbsp; </p>
<p>&nbsp;</p>
&nbsp;</body>

</html>


This is the first part, this part should be the form I guess, now the second part, which is:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-store">
<title>messagehandler</title>
<!--mstheme--><link rel="stylesheet" type="text/css" href="_themes/journal/jour1000.css"><meta name="Microsoft Theme" content="journal 1000, default">
</head>


<%
on error resume next
Set Mailer = Server.CreateObject("CDONTS.NewMail")

MailTo = request("EmailAdress")  
MailFrom = request("_mailfrom")      
Subject = "Mailing Request Swartsenborgh Interieurverzorging"


Message = "Dank U voor Uw interesse in onze mailings" & vbcrlf & vbcrlf 
Message = Message & vbcrlf & "om deze aanmelding te cancelen schrijf naar info@swartsenborgh.nl"
Message = Message & vbcrlf & vbcrlf & "(aanmelding gedaan vanuit www.swartsenborgh.nl)"


Mailer.From = MailFrom
Mailer.To = MailTo
Mailer.Subject = Subject
Mailer.Body = Message
Mailer.Send


Set Mailer = nothing
Message = ""

Set Mailer = Server.CreateObject("CDONTS.NewMail")
MailTo2 = request("_mailfrom")   
Subject = "Mailing Request"

for each whatever in request.form
  Message = Message & whatever & "=" 
  Message = Message & request.form(whatever) & vbcrlf 
next


Mailer.From = Mailfrom2
Mailer.To = Mailfrom2
Mailer.Subject = Subject
Mailer.Body = Message
Mailer.Send

Set Mailer = nothing

Set Mailer = nothing
Message = ""

Set Mailer = Server.CreateObject("CDONTS.NewMail")
Mail = "e.f.hobbel@wanadoo.nl" 

Subject = "Mailing Request"

for each whatever in request.form
  Message = Message & whatever & "=" 
  Message = Message & request.form(whatever) & vbcrlf 
next


Mailer.From = Mail
Mailer.To = Mail
Mailer.Subject = Subject
Mailer.Body = Message
Mailer.Send

Set Mailer = nothing


respons = "bedankt.htm?" & Mailto
response.redirect respons
%>

<body> 
<p><a href="winkel.htm">Onze excuses, er gaat iets mis met het versturen.</a>
<!--TABLE STYLE="filter:glow(color=red, strength=0)"> <TR><TD><center> <p><a href="winkel.htm">Onze excuses, er gaat iets mis met het versturen.</a></TABLE--> 

</p>

</body>


</html>


I'm not sure what this thing does. I got some questions: 1. What language is this written in? 2. What do these 2 things have to do with each other? 3. What errors could be causing this thing not work. 4. When all the bugs are out of it, what should I do with it to get it properly working on my web site? Thanks! [Edited by - Marly on September 19, 2007 3:24:48 AM]

Share this post


Link to post
Share on other sites
1. What language is this written in?
Most of the keywords are written in English and some dutch words are in it

2. What do these 2 things have to do with each other?
The first part is used to cook some food. second is most likely going to eat it :o

3. What errors could be causing this thing not work.
Not using some Code tags :o and forgetting to bake with butter

4. When all the bugs are out of it, what should I do with it to get it properly working on my web site?
Check if you have the ingredients everyday uploaded to the website

Thanks!
np :)

Share this post


Link to post
Share on other sites
Come on Loel, everyone knows that is a distributed modular checksum recomposer.(Duh).

It looks like your ray packers are off, try checking the bit alignment, that should get it working. :D

Share this post


Link to post
Share on other sites
This would be ASP with VBScript.

As for the rest of it, debugging web scripting code is extremely difficult without setting up a new virtual directory and actually running it, seeing it in action, seeing the program flow, and seeing the error messages.

Share this post


Link to post
Share on other sites
Quote:
What do these 2 things have to do with each other?


The first part displays and validates a feedback form. The second part takes the form, sends an e-mail and prints a "thank you" note.

Quote:
What errors could be causing this thing not work.


About a gazillion different things, really.

Share this post


Link to post
Share on other sites

This topic is 3743 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this