Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   Perfect Money   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 11-02-2004, 02:53 PM   #1 (permalink)
Inactive
 
Join Date: 09-28-04
Posts: 26
iTrader: 0 / 0%
Latest Blog:
None

BKSarah is liked by many
Order Form won't redirect! :(

Hello! I am new here, my name is Sarah. I was wondering if I might get some imput on a problem I am having.

I work for a small company and we want to sell some of our stuff online without having to pay someone else for a shopping cart and processing our cards. We have a cc machine in the shop and we have a good rate, so we figured if we set up an order form and they send us the info we can just run the number through our machine here and save $. Anyway, I managed to set up a little online store with a shopping cart, but on the order form, when you hit "submit order" the info goes through to us but it won't redirect to the "Thank you for your order" page. I am thinking, people are going to hit that submit button 10 times thinking their order isn't going through! ARGH! It's not actually open for business yet, I am just testing it out myself. Also, when the order comes to our email it is all garbled, it comes as a POST DATA attatchement that I can barely make out if I open it in Word.

I have done some HTML but nothing as complicated as this before, and I am totally stuck. If anyone has suggestions I would be so grateful. Thank you!
BKSarah is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 11-02-2004, 02:59 PM   #2 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,935
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
I would be helpful if you included a link to the site or the code of the form.

A typical form should look like this.

<form name="form" method="post" action="thank you page">
<input type="text" name="textfield">
<input type="submit" name="Submit" value="Submit">
</form>

imaginemn
__________________
Imagine Creative Services
Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-02-2004, 03:23 PM   #3 (permalink)
Inactive
 
Join Date: 09-28-04
Posts: 26
iTrader: 0 / 0%
Latest Blog:
None

BKSarah is liked by many
Sure, I will put the code here. I have only changed our email and company name for privacy. I'm probably being silly! I don't know what the proper thing to do there is lol Anyway besides changing our email address and company name it's all exactly as I have it written. It is long though, so I will split it in half to get it all posted. Thanks for your help!!!!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Order Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">


index = 0;

function format(val, post)
{
var decpoint;
var begin;
var end;
var valstr;
var temp_char;

valstr = "" + val;
//alert('valstr = ' + valstr);
decpoint = valstr.indexOf(".")
if (decpoint != -1) {
//alert('decpoint = ' + decpoint);
begin = valstr.substring(0,decpoint);
end = valstr.substring(decpoint+1,valstr.length);
//alert('begin = ' + begin + 'nend= ' + end);
}
else {
begin = valstr;
end = "";
}
if (end.length < post)
{while (end.length < post)
{
end += "0";
}
}

end = end.substring(0,post);
//alert('begin = ' + begin + 'nend= ' + end);
return (begin+"."+end);
}


function orderSubmit(type)
{
if (type == 'order')
{if ( ! ( (document.order.order_type.checked) ||
checkRequired() ))

}
}

}






var infowin = null;





function copyToShipping() {
if (document.order.same_flag.checked) {
document.order.ship_name.value = document.order.name_first.value+' '+document.order.name_last.value;
document.order.ship_address1.value = document.order.address1.value;
document.order.ship_address2.value = document.order.address2.value;
document.order.ship_city.value = document.order.city.value;
document.order.ship_state.value = document.order.state.value;
document.order.ship_zip.value = document.order.zip.value;
document.order.ship_country.value = document.order.country.value;
document.order.ship_phone.value = document.order.phone.value;
}
}

function disableSameFlag() {
document.order.same_flag.checked = false;
}



function checkRequired() {
if (!document.order.name_first.value.length ||
!document.order.name_last.value.length ||
!document.order.email.value.length ||
!document.order.address1.value.length ||
!document.order.city.value.length ||
!document.order.state.value.length ||
!document.order.zip.value.length ||
!document.order.country.value.length ||
!document.order.ship_name.value.length ||
!document.order.ship_address1.value.length ||
!document.order.ship_city.value.length ||
!document.order.ship_state.value.length ||
!document.order.ship_zip.value.length ||
!document.order.ship_country.value.length) {
alert('You have not completed all required fields:n' +
'Please complete the Name, Address, City, ' +
'County, Post Code, and Country in both then' +
'Customer Info and Shipping Address sections');
return true;
}
else {
return false;
}
}








<!-- -->
</script><!-- -->
</head>
<body text="#000000" bgcolor="#ffffff" background="images/thisback.gif"><a name="top"></a>
<script language="javascript">
<!-- hide




if (self==parent){document.write('<font color=#ff000><b>This is a frame element, click <a href=index.htm> here </a>for correct page</b></font>')};
<!-- end hide -->
</script>
<center><font color="#ff0000" size="7"><em>Order Form</em>
<br></font></center>
<center>
<br><b>Questions? Comments? Email us at <a href="mailto:YOUR">us@ouremail.com</a> or call us at 1-800-555-5555. </b></center>
<center><b>You can also phone in your order!</b> </center>
<center>
<form name="order" action="MAILTO=us@ouremail.com" method="post">
<input type="hidden" value="Order Forms -Our Company Order Form" name="subject">
<input type="hidden" value="YOUR EMAIL ADDRESS HERE" name="recipient">
<input type="hidden" value="thanku.htm" name="redirect">
<input type="hidden" value="Our Company" name="retailer">
<input type="hidden" value="order" name="form_action">
<script language="javascript">
<!-- hide from Browsers
document.write('<table width=400><td align=center>');

document.write('<table width=400 ><tr><tr><td align=right colspan=3 BGCOLOR=#FF9999><font size=+2>Running Total : $ </td><td colspan=3 BGCOLOR=FF9999> <input type=text name=total size=6 value='+ format(parent.all_order_totals(),2) + '></font></td><tr>');




document.write('<td colspan=6 align=center><b>This is your Order Total so far<br> <i>(Not including shipping charges)</i>.</td></tr><tr></table>');
if (parent.items_ordered == 0)
document.write('<font color=#000080><b>You have not ordered any items so far<b></font>');



if (parent.item_num > 0)
{

for (i =1;i < parent.item_num;i++)
{ if (parent.itemlist[i].quan > 0)
{index = index + 1;
document.write('<a href='+ parent.itemlist[i].url + '><i><b> review : </b></i></a><input size=10 type=text name= ' + parent.itemlist[i].code + ' value= ' + parent.itemlist[i].code + '><input size=6 type=text name= ' + parent.itemlist[i].code + ' value=' + parent.itemlist[i].price + '><input size=20 type=text name= ' + parent.itemlist[i].code + ' value= '+ parent.itemlist[i].desc + '><input size=2 type=text name= ' + parent.itemlist[i].desc + ' value= '+ parent.itemlist[i].quan + '><br>');

}
}
}




<!-- end hiding -->
BKSarah is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-02-2004, 03:24 PM   #4 (permalink)
Inactive
 
Join Date: 09-28-04
Posts: 26
iTrader: 0 / 0%
Latest Blog:
None

BKSarah is liked by many
</script>
<table width="400" border="0">
<tbody>
<tr>
<td align="center" bgcolor="#ff9999" colspan="6"><b>Comments &amp; Additional Information
<br><font color="#ffff00">Can be written in the box below</font>
<br></b></td></tr>
<tr>
<td colspan="6">
<center><textarea name="comments" rows="10" cols="40">&nbsp;</textarea></center></td></tr></tbody></table><!-- Customer Info Table -->
<table cellspacing="0" cellpadding="0" width="400" bgcolor="#00ffff" border="0">
<tbody>
<tr>
<td align="center" bgcolor="#ccffff" colspan="5"><b>Customer Information / Details</b></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>First Name: </b></td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="30" size="30" value="" name="name_first"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Last Name:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="30" size="30" value="" name="name_last"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Email Address:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="60" size="30" value="" name="email"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Address:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="60" size="30" value="" name="address1"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="60" size="30" value="" name="address2"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>City:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="30" size="30" value="" name="city"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>County:</b> </td>
<td bgcolor="#ccffff">
<input type="text" maxlength="10" size="8" value="" name="state"></td>
<td align="right" bgcolor="#ccffff"><b>Post Code:</b> </td>
<td bgcolor="#ccffff">
<input type="text" maxlength="10" size="9" value="" name="zip"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Country:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="25" size="25" value="US" name="country"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Phone:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="25" size="25" value="" name="phone"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Fax:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="25" size="25" value="" name="fax"></td></tr>
<tr>
<td align="center" bgcolor="#ccffff" colspan="5">&nbsp;</td></tr></tbody></table>
<p align="center">
<br><!-- Shipping Address Table --></p>
<table cellspacing="0" width="400" border="0">
<tbody>
<tr>
<td align="center" bgcolor="#ccffff" colspan="2"><font size="4"><b>Shipping Address:</b></font></td>
<td align="center" bgcolor="#ccffff" colspan="3">
<input onclick="copyToShipping()" type="checkbox" value="on" name="same_flag"><font color="#ff0000" size="2">
<blink>Same as above</blink></font> </td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Recipient Name: </b></td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="50" onchange="disableSameFlag()" size="30" value="" name="ship_name"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Address:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="60" onchange="disableSameFlag()" size="30" value="" name="ship_address1"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="60" onchange="disableSameFlag()" size="30" value="" name="ship_address2"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>City:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="30" onchange="disableSameFlag()" size="30" value="" name="ship_city"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>County:</b> </td>
<td bgcolor="#ccffff">
<input type="text" maxlength="10" onchange="disableSameFlag()" size="8" value="" name="ship_state"></td>
<td align="right" bgcolor="#ccffff"><b>Post Code:</b> </td>
<td bgcolor="#ccffff">
<input type="text" maxlength="10" onchange="disableSameFlag()" size="9" value="" name="ship_zip"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Country:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="25" onchange="disableSameFlag()" size="25" value="" name="ship_country"></td></tr>
<tr>
<td align="right" bgcolor="#ccffff" colspan="2"><b>Phone:</b> </td>
<td bgcolor="#ccffff" colspan="3">
<input type="text" maxlength="25" onchange="disableSameFlag()" size="25" value="" name="ship_phone"></td></tr>
<tr>
<td>&nbsp;</td></tr></tbody></table>
<p align="center">
<br><!-- Order Method Table --></p>
<table cellspacing="0" width="400" border="0">
<tbody>
<tr>
<td align="center" bgcolor="#ccffff" colspan="5"><font size="4"><b>Choose Payment Method:</b></font></td></tr>
<tr>
<td align="center" bgcolor="#ccffff" colspan="5"> <font size="2">Credit Card (Visa/MC/AMEX):
<input type="radio" value="phone" name="order_type"></font> </td></tr>
<tr>
<td align="center" bgcolor="#ccffff" colspan="5"> <font size="2">Check/Money Order:
<input type="radio" value="phone" name="order_type"></font> </td></tr></tbody></table>
<div>&nbsp;</div>
<div><strong>This page is not encrypted.</strong></div>
<div><strong>To keep your payment information safe, you will be </strong></div>
<div><strong>sent </strong><strong>a secure e-mail bill after submitting your order. </strong><strong>
<div>
<div>
<br>
<input onclick="orderSubmit('order')" type="button" value="Place Order">
<input type="reset" value="Reset"> </div></div></strong></div></form></center>
</td>
</table>
</body>
</html>
BKSarah is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-03-2004, 10:03 AM   #5 (permalink)
Inactive
 
Join Date: 09-28-04
Posts: 26
iTrader: 0 / 0%
Latest Blog:
None

BKSarah is liked by many
Anyone have ideas?? The page says it is "done, but with errors on the page" and then doesn't redirect. The data submits to my email, but it comes as an attatchment and I don't know what to use to open the attatchment. I tried notebook but it is a big garbled mess and I can barely make out the info. I am so frustrated with this LOL! I would really appreciate some feedback if anyone has time to look at it? Thanks!
BKSarah is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-03-2004, 10:19 AM   #6 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,935
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
I think the MAILTO is causing the proble. First of all you don't want to use the MAILTO tag to submit a form. Not everyone will be able to submit the data to you. Like AOL users or users that DO NOT have outlook installed. What is probably causing the attachment is the combination of Javascript and html combined in the form post to the mailto tag. As far as the redirect I didn't see any code to make it redirect to another page.

You might want to look on the server to see if CDONTS or JMAIL or to see if a CGI or email component is installed on the server so you can use that CGI script or COM script to submit the form POST and redirect to another page.

Sorry if it's a little cryptic but without knowing if you are using ASP, PHP or HTM for your site it's hard to give you specifics.

imaginemn
__________________
Imagine Creative Services
Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-03-2004, 10:37 AM   #7 (permalink)
Inactive
 
Join Date: 09-28-04
Posts: 26
iTrader: 0 / 0%
Latest Blog:
None

BKSarah is liked by many
Well, we sell vehicles, and we have 2 websites that have the vehicles listed and we have a form that you can fill out for more info. Those forms come through to our email just fine, not as an attatchment and easy to read. (We don't sell the vehicles online, they have to call us directly or fill out our "contact request form" for information--this additional shop I want to set up is to sell clothing and small accessories and be able to sell those online.) I didn't set up the websites though, I'm not sure how to do those forms. So apparently our server must have the capability you are talking about? (V7 is our host BTW). So I'm not really sure what to change in my code to make it forward the info to us like it does on our other forms on our vehicle inventory sites. I am ok with more simple c&p HTML but this is more complicated than anything I've ever done before, so I don't know where to edit the code to make it work properly. I could go and find the code we use on the contact request forms, but I wouldn't know where to put it. If that makes sense? LOL Yes, I am lost!
BKSarah is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-03-2004, 10:41 AM   #8 (permalink)
Inactive
 
Join Date: 09-28-04
Posts: 26
iTrader: 0 / 0%
Latest Blog:
None

BKSarah is liked by many
Also, yes, I noticed that when I try to send the info a little box from Outlook popped up and said that it was mailing a form on my behalf. I wasn't sure what that was about, but it seemed odd to me. LOL Duuuhhhh! I feel dumb now. Yes, not everyone will be able to send the form, only those with Outlook set up right? That's not good! Gosh I feel braindead right now lol. Obviously I need a lot more practice with this stuff before I'm going to figure ANYTHING out for myself. Thanks so much for your help!!
BKSarah is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
What order form do you suggest? NameJunky Web Design Lobby 2 10-03-2007 06:50 AM
accept post data from form, process, then redirect data to another script gnznroses Coding Forum 4 09-29-2007 02:39 PM
order form requires a login....?! Yousef T. Fahoum Coding Forum 1 01-30-2007 11:54 AM
Looking for someone to professionally code and order page form Bluecircle Web Design Lobby 1 06-21-2006 09:49 PM
Order Form + OE + Tables Limit Coding Forum 1 05-16-2004 01:21 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 10:27 AM.
© Copyright 2008 V7 Inc