ObjNewMail.Body Question, I'm Sure Very Easy To Fix??

I have a "tell a friend" form and the backend sends the information just fine, however in the bodytext I want the "comments" box text to be added to the e-mail. User fills in his name, his email, friends email, comments box (name=message) and the email is sent except the text from the comments box. My code for the body tag is:

objNewMail.Body = sendersName & " (mailto:" & sendersEmail & ") thought you would be interested in this article " & vbcrlf & vbcrlf & vbcrlf & "Link:" & vbcrlf & request.ServerVariables("HTTP_REFERER")

How can I insert the comments box text in there?

My thought was:
objNewMail.Body = sendersName & " (mailto:" & sendersEmail & ") thought you would be interested in this article " & vbcrlf & vbcrlf & message & "Link:" & vbcrlf & request.ServerVariables("HTTP_REFERER") but it does not work.

View Replies


ADVERTISEMENT

Easy Asp Question?

I need to do a string comparison (in asp) that checks to see if "META" is contained somewhere/anywhere in the string. Can anyone tell me the syntax for doing this?

View Replies View Related

Date (easy One)

<% Response.Write "" & FormatDateTime(now,2) & "" %>

Gives me the date in MM/DD/YYYY. How can I reformat this to DD/MM/YYYY?

View Replies View Related

Easy Solution

I'm hoping for an easy solution to this that I'm not seeing that
someone more experienced will.
All I want to do it mark an option tag as selected....

<%
hourCounter = 1
Do WHILE hourCounter <= 12 %>
<option value="<%=hourCounter%>" <%If hourCounter =
hour(rsCalendarEdit("fld_calendar_DateTime")) Then Response.write "
selected" End If %>><%=hourCounter%></option>
<% hourCounter = hourCounter + 1
Loop
%>

The trouble is if the time is "PM" I have a problem as you can see. Is
there a method or property here I can implement that I'm not seeing?

View Replies View Related

Code Easy

why asp is retarded compared to some other server side scripting languages? or am i just the retard? Code:

<% If Session("auth") = "1" And Session("userid") <> "" Then %>
// Show user information box....
<% Else %>
// Show login form....
<% End If %>
in my head, what i just wrote should equal something like if the session variable "auth" equals 1 and the session variable "userid" does not equal nothing, then do this.well, i haven't set any session variables, and it's processing the chunk of code right after the above if/then. either shows a user information box or a login form.it shows the user information box, instead of the form.

really baffles me considering i haven't set any session variables. i guess this is why i like php better, but i'm trying to get a grasp on asp, it just seems to hard to do something simple. can anyone tell me why that code is returning the wrong block of code?

View Replies View Related

Easy ASP Query

Using ASP & Access. So I am having a total brain-fade. I am trying to pull up data out of a table. But I want a "select all" option. What should the value be for the "select all" option of the form? What should the WHERE statement be in the query?

View Replies View Related

Easy One Display The First 2 Numbers

<%= objrs ("age"), 2)%>????

how do i get it to only display the first 2 numbers?

View Replies View Related

Convert An Easy Php Code To Asp

I am having trouble with our server host they are saying that the php
upload limit is 20 mbs but using the code below with my flash file I
can only get it to do 8mbs. I know that asp is allowing for up to
20mbs though so I was hoping that someone would be able to change this
code to ASP(I am not very good at either php or asp). I think that
should be pretty easy:

<?php

if (is_uploaded_file($_FILES['Filedata']['tmp_name'])) {

$uploadDirectory = "uploads/";
$uploadFile = $uploadDirectory .
basename($_FILES['Filedata']['name']);

copy($_FILES['Filedata']['tmp_name'], $uploadFile);

}
?>

View Replies View Related

Easy String Question

I am just trying to take pieces out of the sql statement individually and display them. I get this error:

ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal

There is data there in the table and I'm not sure what's going on. Code:

View Replies View Related

Easy Site Creator

Im making an asp website for a rotary club what would be the best script to create a website something like a CMS without all the forums and stuff.

View Replies View Related

Easy Graph In Asp Or Html?

What is the easiest way to create a graph in either asp or html code? Is there one? I am doing several SQL queries the result of which I will give me a number. I need to put this number into some kind of graph (bar graph) on the page. THe number will vary so it must be some type of dynamicly created graph.

I would prefer to not use a thrid party tool to do this if possible ......

View Replies View Related

Easy Date Handling

I'm working on a system that requires alot of date handling, and i'm getting pretty tired of doing custom calculating when modifying dates, so i hope someone would be able to help me. Is there any easy way to do re-calculating of dates? such as adding 2,11
or 36 months to a date, and have it automatically checking whether or not it should increase months or year, and by how much?

Like, if i have to add 11 months to the date right now, i have to check which month it's in to see whether or not i could just take one month lesser the next year and so on.

View Replies View Related

Is There An Easy Way To Retieve The Key Value On INSERT

Basicly I have a table that gets contact info and stores it from a form AND emails me...

Problem is I want to just email a link to the ContactInfo.. which should be referenced via the unique PK so whwn i view it, it would be nice to reference the row just inserted...

ala view.asp?emailpk=141

figured there woudl be something like recaffected out there.

View Replies View Related

MVP Or MVC For Easy Migration From Winform To Asp.net

I need to write an application which should work as web application (ASP.NET) and it should have its counterpart for winforms - (they would do the same thing). My question is... what kind of pattern shall I use (MVP or MVC) for writing these apps to minimize overhead of rewriting code (e.g. I'll start writing winform app and then create similar web app )?

View Replies View Related

Should Be An Easy Form To Mail Question

I've searched the forum for the answer to this..it's probably on here somewhere but in a different guise to my particular question and I don't know enough to figure it out.

If I have a basic form to mail ie

strEmail = request.form("Email")

and

mail = "me@me.com"

can I simply do this to get my form to be sent to 2 email addresses?

mail = "me@me.com, you@me.com"

View Replies View Related

Is There An Easy Way To Find Out If All OBJECTS Are Closed?

I have several pages ( ASP) that were working OK on NT4. We moved it to Server 2003. At random , it appears that the Server.CreateObject fails.

I've looked through the code and it looks OK. Is there an easy way to make sure I have Closed all CONNECTIONS RecordSets etc.

View Replies View Related

Dynamic Menu Best Easy Methods

The database is used for referencing filename, there located folder, id, order shown, but also there are some fields say "location_1" up to "location_4" which have a 0 , 1 or 2 in them. 0 means that file not needed for that section. 1 means needed for that section, and 2 means mandantory (must be seen before exit).

firstly selecting a location from a html radio box, drop down menu (not decided yet) will return whats needed so not showing pages what aint needed and wasting time.

Here it is though in order on the left i wish it to build a menu, but more advanced than plain links would be good. drop down like windows explorer etc. Code:

View Replies View Related

How To Create This System Of Easy Form?

i would like to create the following one, but nor I know as. One index.asp that db catches one information as heading, hour of entrance and station time and shows in the page index. An example, let us assume that now they are 23:00, then the shown information will be inserted in the page index.asp in accordance with the current hour.

If it will have something registered in cadastre in db that it starts the 23:00 and it finishes the 01:00 will be in index, passing the hour it leaves and it enters another message with programmed hour.

If I have in db a message that would have to be shown of the 09:00 the 11:30, and now I am 11:20, the system analyze and show the information, until he is 11:31, when then I enter another one, and thus successively, they are menmsagens that in accordance with enter the hour of the server.

View Replies View Related

Easy Date Formatting Question

I have a variable that represents a standard mm/dd/yyyy date , but i want to change it to just October 6

''''

datepart("m","d" , mydatevariable)

'''''

....doesnt work.

View Replies View Related

Easy To Setup Web Chat For Windows?

i'm looking for a easy to setup web chat script that i can install on IIS? if someone can point me in the right direction it woudl be great, i download a couple cgi scripts but couldn't get them to load.

View Replies View Related

Is There An Easy Way To Find Out If All OBJECTS Are Closed?

I have several pages ( ASP) that were working OK on NT4.
We moved it to Server 2003. At random , it appears that the
Server.CreateObject fails.

I've looked through the code and it looks OK.

Is there an easy way to make sure I have Closed all
CONNECTIONS
RecordSets
etc.

View Replies View Related

CDONTS With BODY

I am trying to create a form with just an email address and a text area so I as the administrator can send a customer an email with an attachment. I have the form set up with the email address but I can not get the CDONTS to send the textarea.

I make the textarea the object body but it still does not work. Any help would be appreciated. I was able to do it with ASPEmail but not with CDONTS. I want to be able to open the form and put the customers email address in the form and then a message in the textarea to send them an email also with an attachemnt.

View Replies View Related

ASP In Body Tags

i've got a problem with asp tags in the <body>.Looks like this:
<body <%if len(request.form("field1")) > 0 AND len(variable1) > 0 then %>onload="javascript:testSite1();"<% elseif len(request.form("field2")) > 0 AND len(variable2) > 0 then %>onload=":javascript:testSite2();"<% end if%>>

Now is on the top of my site written: 0 AND len(variable1) > 0 then %>onload="javascript:testSite1();" 0 AND len(variable2) > 0 then %>onload="javascript:test and the caption is not on the top of the site!

View Replies View Related

BODY ONLOAD()

i've been using body onload()for ages but since i changed my internet explorer (to 6.02) and OS (XP), i started to get this IE script error and i don't know how to get rid of it.

I read somewhere that if I put the onload event in an inline script tag at the bottom of the my form body, it all works fine, but this doesn't work either.what i should do?

View Replies View Related

In Head Or Body

I want to know the difference and effect of placing ASP Code in the begining of .asp File and placing code inside <Head</ HeadTag and Placing code inside <body></bodytag. Just as follows:

1. Placing code in the Begining of asp file

<% Response.write "Hello" %>

<head>....</head>
<body>....</Body>

2. Placing code in the Head

<head <% Response.write "Hello" %</head>
<body>....</Body>

3. Placing code in Body

<head>.....</head>
<body<% Response.write "Hello" %</body>

View Replies View Related

Add Body To Mailto

I'm just learning ASP. I have a mailto and I have a lot of text that I want to display in the body. Is there a way to store that text in a variable & then add it to the mailto tag?

View Replies View Related

A Loop Within The Body Of An Email?

I've created a page for our Call Center that allows them to view a list of resources that can be found on our online catalog. It's a recordset that has a checkbox associated with each title. In addition, there's several fields that they're asked to populate: "From," "To," etc so they can click the links they want to send, attach a customized message and then send it off as an email.

The problem is capturing all of the titles they've checked and publishing that list in an email. Here's the code I'm using to retrieve the results:

For i = 1 to Request.Form("check").count
set RSLink = conn.execute("select * from Master where ISBN = '" & Request.Form("check").item(i) & "'")
response.write x
Next

No problem! But how do I get that list of items that have been "checked" into the body of my email?

View Replies View Related

ASP Include/strip Body Tag?

We have an unusual situation at the USC School of Medicine; we have to
covert every Web page to a template. The template is too wide to print and a
lot of our students print lectures, notes, etc. We thought we could keep to
the template and draw in the content from other files by using includes. BUT
these files are HTML files and therefore, have Body commands in them. If
this could work, we could put a printable link back to the other page and it
would print. Seems like a great solution except for the extra body commands.
We are using ASP for our scripting.

1. How much of a boondoggle will it be if the files have two body commands
in them. How many browsers would it break?

2. Is there a scripting way around this without creating some objects?

3. Is there something out there -- shareware or commercial -- that would fix
this problem.

4. Could something be done about this using pearl, for example?

We'd really like to do it this way because we can have the users create the
content, use the same file names all the time, thus overwriting the old
file, and the user would never get a chance to screw up the template.

View Replies View Related

Copy From Body Into Title

I need some asp which I can use to put between some words within the
body of a page which takes these words and places them inbetween the
title tags.The idea is when an editor changes these tagged words (with
Contribute2), it will also change in the title tags of a page.

View Replies View Related

Mail Body Get Truncated While Using CDO In ASP

i ve upgraded my asp application to windows 2003 +IIS 6.0 + virtual
SMTP server enabled environment from win 2000.

so i need to update the mail procedure too.(becox i used CDONTs
previously which is not supported in win 2003 by default).i have coded
my mail sending script using CDO. The problem i am now facing is the
mail message which is generated by my application is get truncated at
the receiving end..

Also i want to mention the way i coded my mailing module.
i have a vbscript function to send email that uses CDO now
and mailsending script is being called by a javascript block where i am
concatenating the mail body.

Also i dont receive mails at some personal domains. at the same time
mail reaches free domains like yahoo,hotmail gmail.

View Replies View Related

Is There An Easy Way To Prevent Duplicate Records Being Added To A Access DB

I am adding simple records to a fairly simple access database with the following code

rsEntry.Fields("Player1") = ShortName(Player1)
rsEntry.Fields("Player2") = ShortName(Player2)

'Write the updated recordset to the database
rsEntry.Update
rsEntry.Close
adoCon.Close
Set rsEntry = Nothing
Set adoCon = Nothing

How can I SIMPLY :-) prevent duplicate records from being added? I know I can set the index property on the fields but that mean handling the errors - not sure how to do this.
OR I could write the code to seach the DB before update - which may be the only way :-(

Is there a simple way?

View Replies View Related

Creating An HTML Email Body

I have a rather large form in HTML that needs to be sent as an email. The body of the email is approx. 400 lines (that's in HTML). Is it possible to somehow transfer the entire form to the asp mail script so that it automatically sets the body of the email to contain this form (with input)? Or do I have to write the body by hand in my asp script - like this:

line 001 Body = "<table><tr><td>some text & var1 & </td></tr> "
... ..

line 200 Body = Body & "</table>"

View Replies View Related

Cdosys Body Text Is Not Being Sent By Email

cdosys body text is not being sent by email. Please see if you can spot the problem. Everything below emailHeader & emailFooter is not being sent by email.

see code below:

<!--- BEGIN CDOSYS CODE --->

<%
dim strBody
Set MailObj=CreateObject("CDO.Message")
MailObj.Subject="Your Online order from store-website"
MailObj.From= "store@store.com"
MailObj.To= Request.Form.Item("cEmail")
MailObj.Bcc="store@store.com"
MailObj.TextBody = strBody

emailHeader = "DELIVERY INFORMATION"
strBody = strBody & "DELIVERY INFORMATION (If Delivery was selected):" & VbCrLf
strBody = strBody & "Delivery Choice: " & Request.Form("dChoice") & " on " & Request.Form("choiceDate") & VbCrLf
strBody = strBody & "Delivery Name: " & Request.Form("dName") & VbCrLf
strBody = strBody & "Delivery Address: " & Request.Form("dAddress") & VbCrLf
strBody = strBody & "Delivery City: " & Request.Form("dCity") & VbCrLf
strBody = strBody & "Delivery Zipcode: " & Request.Form("dZip") & VbCrLf
strBody = strBody & "Delivery Phone: " & Request.Form("dPhone") & VbCrLf
strBody = strBody & "Delivery Instructions: " & Request.Form("dInstructions") & VbCrLf
strBody = strBody & "-----------------------------------------" & VbCrLf & VbCrLf

emailFooter = "CONTACT/BILLING INFORMATION"
strBody = strBody & "CONTACT/BILLING INFORMATION: " & VbCrLf
strBody = strBody & "Billing Name: " & Request.Form("cName") & VbCrLf
strBody = strBody & "Billing Address: " & Request.Form("cAddress") & VbCrLf
strBody = strBody & "Billing City: " & Request.Form("cCity") & VbCrLf
strBody = strBody & "Billing Zipcode: " & Request.Form("cZip") & VbCrLf
strBody = strBody & "Billing Phone: " & Request.Form("cPhone") & VbCrLf
strBody = strBody & "Billing Email: " & Request.Form("cEmail") & VbCrLf
strBody = strBody & "Amount to be paid with Gift Certificate: " & Request.Form("GiftCamount") & VbCrLf
strBody = strBody & "Gift Certificate Number: " & Request.Form("GiftCnumber") & VbCrLf
strBody = strBody & "Amount to be paid with Credit Card: " & Request.Form("cCardAmount") & VbCrLf
strBody = strBody & "Credit Card Type: " & Request.Form("cCard") & VbCrLf
strBody = strBody & "Credit Card Number: " & Request.Form("cCardNumber") & VbCrLf
strBody = strBody & "Credit Card Expiration: " & Request.Form("cCardExpiration") & VbCrLf
strBody = strBody & "-----------------------------------------" & VbCrLf

wantedCartColArray = Array(0,0,0,1,1,1,1)
wantedCartColNamesArray = Array("LineItemTax","LineItemTaxValue","ProductID","Quantity","Name","Price","Total")
wantedCartColFormatArray = Array(false,false,false,false,false,true,true)
currencyTypeArray = Array("$",0,-1,-2,-2,-2)

%>

<%
' UltraCart II Email Order Version 2.01
MailObj.TextBody = UCII.BuildEmailBody(false,emailHeader,emailFooter, _
wantedCartColArray,_
wantedCartColNamesArray,_
wantedCartColFormatArray,_
"Order ID",true,_
"Order Date",true,_
"Sub Total",true,_
"Tax",true,_
"Discount",false,_
"Shipping",false,_
"Shipping Method",false,_
"Grand Total",true,currencyTypeArray)


MailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
MailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
MailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
MailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
MailObj.Configuration.Fields.Update
MailObj.Send
Set MailObj = nothing
%>

<!--- END CDOSYS CODE --->

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved