Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to Get Rid of Commas

Reply
Thread Tools

How to Get Rid of Commas

 
 
tp_michele_jones@hotmail.com
Guest
Posts: n/a
 
      02-18-2005
Hi,

I'm collecting an email address in one asp page as follows:

<%@ Language="VBScript"%>
<%Option Explicit%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Mailing Services</title>
</head>
<html>
<body topmargin="0" leftmargin="0" bgcolor="#000000" text="#000000"
link="#000000" vlink="#000000" alink="#000000">
<form method="POST" action="overstockconf.asp">
<table border="0" cellpadding="0" cellspacing="0" width="650">
<tr>
<td></td>
<td>E-mail</td>
<td><input type="TEXT" name="Email" size="50"></td>
</tr>
</table>
<%
Response.Write ("<input type=hidden name=Email value=" &
request.querystring("Email") & ">")
%>
</form>
</body>
</html>

And then I'm printing it out in a second asp page and an email as
follows:

<%@ Language="VBScript"%>
<%Option Explicit%>
<%
Dim strEmail
strEmail = Request.Form("Email")
strFrom = "(E-Mail Removed)"
strTo = "(E-Mail Removed)"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Mailing Services-Confirmation</title>
</head>
<html>
<body topmargin="0" leftmargin="0" bgcolor="#000000" text="#ffffff"
link="#990033" vlink="#003300" alink="#cc6600">
<form method="POST" action="overstockconf.asp">
<table border="0" cellpadding="0" cellspacing="0" width="650">
<tr>
<td>&nbsp;</td>
<td>Email</td>
<td><%= Request.Form("Email")%></td>
</tr>
</table>
<%
Dim objMail
Set objMail = CreateObject("CDONTS.NewMail")
objMail.From = strFrom
objMail.To = strTo
objMail.Subject = "Overstock Confirmation"
StrMessage = strMessage & "Authorizing Person's Email - " &
Request.Form("Email") & vbCrLf
objMail.Body = strMessage
objMail.Send
Set objMail = nothing
%>
</form>
</body>
</html>

Both the second asp page and the email add a comma after the email
address that was entered in the field in the first asp page. Does any
one know how to get rid of it.

I'm a new web developer and have lots of books all over my desk. I've
check news groups, but I still can't seem to figure this one out. I'm
hoping it's a silly little mistake.

Thanks,

Michele

 
Reply With Quote
 
 
 
 
Augustus
Guest
Posts: n/a
 
      02-18-2005

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hi,
>
> I'm collecting an email address in one asp page as follows:
>
> <%@ Language="VBScript"%>
> <%Option Explicit%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> <title>Mailing Services</title>
> </head>
> <html>
> <body topmargin="0" leftmargin="0" bgcolor="#000000" text="#000000"
> link="#000000" vlink="#000000" alink="#000000">
> <form method="POST" action="overstockconf.asp">
> <table border="0" cellpadding="0" cellspacing="0" width="650">
> <tr>
> <td></td>
> <td>E-mail</td>
> <td><input type="TEXT" name="Email" size="50"></td>
> </tr>
> </table>
> <%
> Response.Write ("<input type=hidden name=Email value=" &
> request.querystring("Email") & ">")
> %>
> </form>
> </body>
> </html>
>
> And then I'm printing it out in a second asp page and an email as
> follows:
>
> <%@ Language="VBScript"%>
> <%Option Explicit%>
> <%
> Dim strEmail
> strEmail = Request.Form("Email")
> strFrom = "(E-Mail Removed)"
> strTo = "(E-Mail Removed)"
> %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> <title>Mailing Services-Confirmation</title>
> </head>
> <html>
> <body topmargin="0" leftmargin="0" bgcolor="#000000" text="#ffffff"
> link="#990033" vlink="#003300" alink="#cc6600">
> <form method="POST" action="overstockconf.asp">
> <table border="0" cellpadding="0" cellspacing="0" width="650">
> <tr>
> <td>&nbsp;</td>
> <td>Email</td>
> <td><%= Request.Form("Email")%></td>
> </tr>
> </table>
> <%
> Dim objMail
> Set objMail = CreateObject("CDONTS.NewMail")
> objMail.From = strFrom
> objMail.To = strTo
> objMail.Subject = "Overstock Confirmation"
> StrMessage = strMessage & "Authorizing Person's Email - " &
> Request.Form("Email") & vbCrLf
> objMail.Body = strMessage
> objMail.Send
> Set objMail = nothing
> %>
> </form>
> </body>
> </html>
>
> Both the second asp page and the email add a comma after the email
> address that was entered in the field in the first asp page. Does any
> one know how to get rid of it.
>
> I'm a new web developer and have lots of books all over my desk. I've
> check news groups, but I still can't seem to figure this one out. I'm
> hoping it's a silly little mistake.




The problem is in this bit of code here:

-----------------------------------------------------
<td><input type="TEXT" name="Email" size="50"></td>
</tr>
</table>
<%
Response.Write ("<input type=hidden name=Email value=" &
request.querystring("Email") & ">")
-----------------------------------------------------

You have 2 form items with the same name... so your next page is showing
them as a collection.

IE: if on page 1 you had a form with:
<input type="text" name="color" value="red">
<input type="text" name="color" value="green">
<input type="text" name="color" value="blue">

and then on the second page you put in:

response.write request.form("color")

Your output would look like:
red, green, blue

and thats because "color" refers to 3 form items on the first page... and
thats your problem: you have 2 form items on the first page with the same
name: "Email"

As a side note: your code above uses CDONTS... you should, to save yourself
time and headaches in the future, start switching to CDO instead. The two
(CDO and CDONTS) are almost the same as far as sending out an email goes,
but the big difference is that CDONTS is no longer supported in Windows
Server 2003... so when your host eventually switches to Win2K3 (or you get a
new host) you don't end up with potentially a bunch of pages that need
converting to the new way of doing email from the server.



 
Reply With Quote
 
 
 
 
Richard
Guest
Posts: n/a
 
      02-18-2005
On 18 Feb 2005 09:49:56 -0800 http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Hi,


> I'm collecting an email address in one asp page as follows:


> <%@ Language="VBScript"%>


I trust you understand that VBscript will only work in IE??
i was going to use it myself until I found that out.



 
Reply With Quote
 
WebMaster
Guest
Posts: n/a
 
      02-18-2005

"Richard" <Anonymous@127.001> wrote in message
news:(E-Mail Removed)...
> On 18 Feb 2005 09:49:56 -0800 (E-Mail Removed) wrote:
>
> > Hi,

>
> > I'm collecting an email address in one asp page as follows:

>
> > <%@ Language="VBScript"%>

>
> I trust you understand that VBscript will only work in IE??


it's an asp page, so it's serverside. Wich client you use is therefore
irrelevant...

Rudy


 
Reply With Quote
 
Duende
Guest
Posts: n/a
 
      02-18-2005
While sitting in a puddle Richard scribbled in the mud:

> On 18 Feb 2005 09:49:56 -0800 (E-Mail Removed) wrote:
>
>> Hi,

>
>> I'm collecting an email address in one asp page as follows:

>
>> <%@ Language="VBScript"%>

>
> I trust you understand that VBscript will only work in IE??
> i was going to use it myself until I found that out.
>
>
>

Why?


--
D?
Adults die young.
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      02-18-2005
WebMaster wrote:

> "Richard" <Anonymous@127.001> wrote in message
> news:(E-Mail Removed)...
>
>> On 18 Feb 2005 09:49:56 -0800 (E-Mail Removed) wrote:
>>
>>> I'm collecting an email address in one asp page as follows:

>>
>>> <%@ Language="VBScript"%>

>>
>> I trust you understand that VBscript will only work in IE??

>
> it's an asp page, so it's serverside. Wich client you use is
> therefore irrelevant...


Richard only knows of PurloinedScript...

--
-bts
-This space intentionally left blank.
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      02-18-2005
On Fri, 18 Feb 2005 13:09:32 -0600, "Richard" <Anonymous@127.001>
wrote:

>> <%@ Language="VBScript"%>

>
>I trust you understand that VBscript will only work in IE??


It also runs on web servers running ASP.

<%@ Language="VBScript"%>

Is an ASP statement switching the language for the page into VBScript.


>i was going to use it myself until I found that out.


That, and the fact that Basic is beyond you and you still haven't
written any code anyway, just copied it from others.


PS to the original poster. VBScript is horrible - use JavaScript
instead. Much better error trapping is just one good benefit you'll
see.
 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      02-19-2005
On Fri, 18 Feb 2005 23:49:54 +0000 Andy Dingley wrote:

> On Fri, 18 Feb 2005 13:09:32 -0600, "Richard" <Anonymous@127.001>
> wrote:


>>> <%@ Language="VBScript"%>


>>I trust you understand that VBscript will only work in IE??


> It also runs on web servers running ASP.


> <%@ Language="VBScript"%>


> Is an ASP statement switching the language for the page into VBScript.


See people? This is how areply should be, informative.


>>i was going to use it myself until I found that out.


> That, and the fact that Basic is beyond you and you still haven't
> written any code anyway, just copied it from others.


Excuse me, sir, but I started off in computers writing BASIC codes.
Why should one take the time to write a duplicate of something that's
already been written?


> PS to the original poster. VBScript is horrible - use JavaScript
> instead. Much better error trapping is just one good benefit you'll
> see.


What makes you think VBscript can't do error handling?


 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      02-19-2005
Richard wrote:

>>> I trust you understand that VBscript will only work in IE??


> See people? This is how areply should be, informative.


How about correct? Should they be correct?

--
-bts
-This space intentionally left blank.
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      02-19-2005
On Sat, 19 Feb 2005 08:58:58 -0600, "Richard" <Anonymous@127.001>
wrote:

>See people? This is how areply should be, informative.


Don't try flattering to get on my good side - I still think you're the
Jar Jar Binks of web design,

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
replace double inverted commas into slash double inverted commas in string AviraM Java 2 09-28-2006 06:19 PM
Getting rid of inverted commas around a string. Fearban@gmail.com Perl Misc 8 05-25-2006 06:10 PM
how do I get rid of beeping sound every time I get a new email? joe54345@gmail.com Computer Support 13 12-06-2005 10:14 PM
Need to double inverted commas if using parameters? Jon Maz ASP .Net 3 02-13-2004 05:35 PM
Perl expression for parsing CSV (ignoring parsing commas when in double quotes) GIMME Perl 2 02-11-2004 05:40 PM



Advertisments