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



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 13th, 2006, 01:19 PM
proboscis74 proboscis74 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 5 proboscis74 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 3 sec
Reputation Power: 0
Can't Submit a form!

Hi

I am new to ASP and was doing okay til I tried to add an online form to my website. The form is okay but I want to to send information so that it appears as an email message in my inbox - if that is possible.

I created a file called html_form_action.asp, but when I run it just says "server can't find file..."

This is the code, would be grateful for any help...thanks

<html>
<head>
</head>
<body alink="white" bgcolor="white">
<table style="WIDTH: 680px; HEIGHT: 500px" width="680" border="0">
<h1><font color="maroon"><font size="4"><font face="Century Gothic"></font></font></font>
</h1>
<tbody>
<form action="html_form_action.asp" method="get" runat="server">
<tr>
<td>
<font face="Century Gothic" color="maroon" size="4">>>&nbsp;Contact Us>></font></td>
<td colspan="3">
</td>
</tr>
<tr>
<td>
<font face="Century Gothic" color="gray" size="2">Full Name (Head of Group)</font></td>
<td colspan="3">
<input type="text" size="30" name="name" /></td>
</tr>
<tr>
<td>
<font color="#800000"><font face="Century Gothic"><font color="gray" size="2">Email</font> </font></font></td>
<td colspan="3">
<font face="Trebuchet MS" color="maroon">
<input type="text" size="30" name="email" /></font></td>
</tr>
<tr>
<td>
<font face="Trebuchet MS" color="#800000"><font face="Century Gothic" color="gray" size="2">Contact
Number</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></td>
<td colspan="3">
<input type="text" size="30" name="phone" /></td>
</tr>
<tr>
<td>
<font face="Century Gothic" color="gray" size="2">No. of Visas</font></td>
<td colspan="3">
<select size="1" name="Visas_Required">
<option selected="selected">1<option>2<option>3<option>4<option>5<option>6<option>7<option>8<option>9<option>10<option>11<option>12<option>12+</option>
</option>
</option>
</option>
</option>
</option>
</option>
</option>
</option>
</option>
</option>
</option>
</option>
</select>
</td>
</tr>
<tr>
<td>
<font face="Trebuchet MS" color="#800000"><font face="Century Gothic" color="gray" size="2">Visa
Type</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></td>
<td colspan="3">
<select size="1" name="Visas_Required">
<option selected="selected">Tourist (6 month single/multiple entry)<option>Business
(6 month single/multiple entry)<option>3></option>
</option>
</option>
</select>
</td>
</tr>
<tr>
<td>
<font face="Century Gothic" color="gray" size="2">Date of Travel (dd/mm/yyyy)</font></td>
<td colspan="3">
<input type="text" size="10" name="date" /></td>
</tr>
<tr>
<td>
<font face="Century Gothic" color="gray" size="2">Speed of Service</font></td>
<td colspan="2">
<strong><font face="Trebuchet MS" color="#800000"><font color="black" size="2">Standard</font>
<input type="radio" value="standard" name="speed" /></font></strong></td>
<td>
<strong><font face="Trebuchet MS" color="#800000"><font color="black" size="2">Premium</font>
<input type="radio" value="premium" name="Speed" /></font></strong></td>
</tr>
<tr>
<td>
<font face="Century Gothic" color="gray" size="2">Other Information</font></td>
<td colspan="3">
<textarea style="WIDTH: 220px; HEIGHT: 57px" name="comment" rows="3" cols="25"></textarea>
</td>
</tr>
<tr>
<td>
</td>
<td colspan="3">
&nbsp;&nbsp;<input type="submit" value="Submit" />
<input type="reset" value="Reset" /></td>
</tr>
<tr>
<td>
</td>
<td colspan="3">
&nbsp;
</td>
</tr>
</form>
</tbody>
</table>
<tr>
<td>
</td>
<td colspan="3">
</td>
</tr>
<tr>
<td>
</td>
<td colspan="3">
</td>
</tr>
<tr>
<td>
</td>
&nbsp;
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<strong><font face="Trebuchet MS">&nbsp;&nbsp;</font></strong></td>
&nbsp;
</tr>
<tr>
<td colspan="4">
<strong><font face="Trebuchet MS">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></strong>&nbsp;
</td>
</tr>
<tr>
<td colspan="4">
<strong><font face="Trebuchet MS">&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;</font></strong></td>
</tr>
<tr>
<td colspan="4">
<strong><font face="Trebuchet MS">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></strong>
</td>
</tr>
</body>
</html>

Reply With Quote
  #2  
Old March 14th, 2006, 07:46 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
hmm, that's a lot of &nbsp;'s =)

make sure this form is in the same directory as the ASP page you're connectign to (as that's what is indicated in your FORM action). Make sure your ASP file is spelt correctly.

What happens if you take runat="server" out?
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #3  
Old March 14th, 2006, 03:40 PM
proboscis74 proboscis74 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 5 proboscis74 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 3 sec
Reputation Power: 0
asp...x

Quote:
Originally Posted by MadCowDzz
hmm, that's a lot of &nbsp;'s =)

make sure this form is in the same directory as the ASP page you're connectign to (as that's what is indicated in your FORM action). Make sure your ASP file is spelt correctly.

What happens if you take runat="server" out?


All my pages are .htm except for the html_form_action.aspx file. Normally an error msg would be displayed saying that it cannot connect, etc. But this time I added and "x" onto the "asp" (as thats what the file ending was) and no error msg. However I'm not sure what it actually achieved. The .aspx file is empty.

What I really want is for the submit button to send the data from the forms to MY EMAIL...any suggestions. Previously when I tried this it just opened an empty Outlook message!

Reply With Quote
  #4  
Old April 7th, 2006, 08:08 PM
Ben Last Ben Last is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 9 Ben Last User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 58 m 43 sec
Reputation Power: 0
I'm not entirely sure how you would do this but your first page which displays the form just collects the data from the user, when the user clicks 'Submit' the data is passed to whatever file was specified in the <form action="myfile.aspx">.

So if your aspx file is empty then the form is collecting the data and passing it to the aspx page which isn't doing anything with the data.

You need some kind of code in the second page which sends the recieved data to an email.

No sure if this helps you or not.

Reply With Quote
  #5  
Old April 10th, 2006, 11:38 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
There are all kinds of email form tutorials out there on the world wide web.

I stronly encourage a cleanup of the HTML...
FONT tags are deprecated, and nested FONT tags are just ugly. ;-)

Reply With Quote
  #6  
Old April 13th, 2010, 02:06 PM
horridge horridge is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2010
Posts: 1 horridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 59 sec
Reputation Power: 0
I'm having similar problems. Should we be writing some "reception" code in the .aspx file?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Can't Submit a form!


Developer Shed Advertisers and Affiliates


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

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


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap