Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Help needed by a newie please
Old 02-15-2006, 06:55 PM Help needed by a newie please
Junior Talker

Posts: 4
Location: Somerset, UK
Trades: 0
Hi all

My knowledge of asp is basic.

I need to have two asp forms that work simultaneously one that emails the users input, the other to send you to paypal. Ifound the below script whilst searching for help.

The script is great and does what I want with one problem some reason I am getting two identical emails.

I would be most grateful for any assistance on this, it is driving me mad or even a better way of doing it without having to press two submit buttons.



<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBS CRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<script>
function submitallforms() {
setTimeout('document.forms[0].submit()',100);
setTimeout('document.forms[1].submit()',200);
setTimeout('document.forms[2].submit()',300);
// End -->
</script>
</head>
<body>
<form action= "email.asp" method="post">
<p>Email Address: <input name="email" type="text" id="email" size="50"></p>
<p>Question: (maximum of 250 characters) <br>
<textarea name="question" cols="60" rows="10" id="question"></textarea></p>
<p align="right">
<input type="reset" name="Reset" value="Reset The Form">&nbsp;&nbsp;&nbsp;
<input type="submit" value="Submit Your Question" onclick="submitallforms();"></p>
</form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="email address goes here">
<input type="hidden" name="item_name" value="name of item here">
<input type="hidden" name="amount" value="10.00">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="page to go to once paid">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="bn" value="PP-BuyNowBF">
</form>
</body>
</html>
nikinackynoo is offline
Reply With Quote
View Public Profile Visit nikinackynoo's homepage!
 
 
Register now for full access!
Old 02-16-2006, 06:32 AM Re: Help needed by a newie please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
bit more info on what exactly you are trying to do will help

and the code above the doctype is completely wrong
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-16-2006, 08:37 AM Re: Help needed by a newie please
Junior Talker

Posts: 4
Location: Somerset, UK
Trades: 0
Quote:
Originally Posted by chrishirst
bit more info on what exactly you are trying to do will help

and the code above the doctype is completely wrong
Haven't got a clue where that code came from, maybe that is what is causing the duplicated emails. I will correct asap

I am trying to send a form (email address and question) to an email address and at the same time to divert the user to paypal (with pasific criterial) but without having to click more than one submit button.
nikinackynoo is offline
Reply With Quote
View Public Profile Visit nikinackynoo's homepage!
 
Old 02-16-2006, 04:31 PM Re: Help needed by a newie please
Junior Talker

Posts: 4
Location: Somerset, UK
Trades: 0
All sorted now

All I did was change the script - so if anybody else wants to be able to send and email and then send to paypal the script is below

<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBS CRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<script>
function submitallforms() {
setTimeout('document.forms[0].submit()',100);
setTimeout('document.forms[1].submit()',100);
}// End -->
</script>
</head>
<body>
<form action= "email.asp" method="post">
<p>Email Address: <input name="email" type="text" id="email" size="50"></p>
<p>Question: (maximum of 250 characters) <br>
<textarea name="question" cols="60" rows="10" id="question"></textarea></p>
<p align="right">
<input type="reset" name="Reset" value="Reset The Form">&nbsp;&nbsp;&nbsp;
<input type="submit" value="Submit Your Question" onclick="submitallforms();"></p>
</form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="">
<input type="hidden" name="item_name" value="">
<input type="hidden" name="amount" value="10.00">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="bn" value="PP-BuyNowBF">
</form>
</body>
</html>
nikinackynoo is offline
Reply With Quote
View Public Profile Visit nikinackynoo's homepage!
 
Reply     « Reply to Help needed by a newie please
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26893 seconds with 12 queries