ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 2nd, 2009, 09:57 AM
milo1 milo1 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 5 milo1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 53 sec
Reputation Power: 0
Help with my simple form please!

Ok, so I'm partially there to get my form working in my visual web dev page. (My web developer left us so I'm filling in!) I had someone supply me with a form processor but now I don't know how to connect it to info I want emailed from an online form.

The mail processor is (on a seperate page in my website called testemail.asp):

<%@ Language=VBScript %>
<%
Dim objSendMail
Set objSendMail = CreateObject("CDONTS.NewMail")
With objSendMail
'.BodyFormat = 0
'.MailFormat = 0
.From = "WebMaster@mycompany.org"
.To = "me@mycompany.org"
.Cc = " "
.Subject = "Test Email - IIS Server"
.Body = "This is a test email"
.Send
End With
set objSendMail = nothing

Response.Write("Test Email Sent")
%>

_________________________________

The form fields I need to capture on my online page which is .aspx are:

Physician Name:
Physician NPI:
Sender's Email:
Sender's Name:
_________________________________

How do I get the form fields to send the data to me via the testemail.asp page? I have a hard time figuring this out because the entire site is .apsx pages and when I put in vb code it messes it up as I'm not too versed in coding.


Any help is appreciated!
Thank you

Reply With Quote
  #2  
Old July 2nd, 2009, 05:08 PM
milo1 milo1 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 5 milo1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 53 sec
Reputation Power: 0
Unhappy

This is the issue!! my .aspx webpage that contains my form has the <form> line calling out an incorrect command that I cannot figure out since I don't know VB.

The form works fine as an html page but not as .aspx page in visual web.

Here is the line on my form page that calls out my formmail.asp page to send my online form data.

<form method="post" action="~/formmail.asp">

the action="" command I'm guessing isnt right so it doesnt send my info to the formmail.asp page. What code should i put in there to send my online form correctly??

Reply With Quote
  #3  
Old July 2nd, 2009, 05:20 PM
mystic7's Avatar
mystic7 mystic7 is offline
Contributing User
Click here for more information.
 
Join Date: Sep 2006
Posts: 1,500 mystic7 User rank is Captain (20000 - 30000 Reputation Level)mystic7 User rank is Captain (20000 - 30000 Reputation Level)mystic7 User rank is Captain (20000 - 30000 Reputation Level)mystic7 User rank is Captain (20000 - 30000 Reputation Level)mystic7 User rank is Captain (20000 - 30000 Reputation Level)mystic7 User rank is Captain (20000 - 30000 Reputation Level)mystic7 User rank is Captain (20000 - 30000 Reputation Level)mystic7 User rank is Captain (20000 - 30000 Reputation Level)mystic7 User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 12 h 34 m 54 sec
Reputation Power: 292
That's not vbscript or ASP, or even asp.net, it's just html code for a form. If the formmail.asp page is in the same directory as this page then just have action="formmail.asp"

If it's one directory up (which I doubt), then action="../formmail.asp"

Reply With Quote
  #4  
Old July 2nd, 2009, 05:23 PM
milo1 milo1 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 5 milo1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 53 sec
Reputation Power: 0
Quote:
Originally Posted by mystic7
That's not vbscript or ASP, or even asp.net, it's just html code for a form. If the formmail.asp page is in the same directory as this page then just have action="formmail.asp"

If it's one directory up (which I doubt), then action="../formmail.asp"



No I know that line is just html - I tried action="formmail.asp and nothing happens. Formmail.asp is in my root dir for right now.

Reply With Quote
  #5  
Old July 3rd, 2009, 06:53 AM
naturebest07@gm naturebest07@gm is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 43 naturebest07@gm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 2
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
Dim strMessage
strMessage = Request.Form("Physician Name") & request.Form("Physician NPI") & request.Form("Sender's Name")
theSchema="http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig=server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(theSchema & "sendusing")= 2
cdoConfig.Fields.Item(theSchema & "smtpserver")="your smtp server address"
cdoConfig.Fields.Update
Set cdoMessage=Server.CreateObject("CDO.Message")
cdoMessage.Configuration=cdoConfig
cdoMessage.From=Request.Form("Sender's Email")
cdoMessage.To="your email address"
cdoMessage.Subject= Request.Form("subject")
cdoMessage.TextBody= strMessage
cdoMessage.Send
Response.Redirect("http://www.yourwebsite.com")

Set cdoMessage=Nothing
Set cdoConfig=Nothing
%>
</body>
</html>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Help with my simple form please!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek