Jump to content


Photo

need to set up custom error page


  • This topic is locked This topic is locked
8 replies to this topic

#1 jpwebdesigner

jpwebdesigner

    Member

  • Members
  • PipPip
  • 13 posts

Posted 10 March 2005 - 09:31 AM

i need to set up a page that customers are redirected to if there is an error in one of the fields they filled out. for example, in the amount field, if they entered $12j.00 - instead of directing them to the paypayl error detected page, they will go back to the original website OR if they click the continue button on the paypal error detected page, they go back to the donate page. can this be done?

#2 Andrew Chang

Andrew Chang

    Average Member

  • Members
  • 738 posts

Posted 10 March 2005 - 10:08 AM

You would need to validate the form before posting it.

example
function Validator(theForm)
{

if (theForm.amount.value == "")
{
alert("Please enter a value for the \"Amount\" field.");
theForm.amount.focus();
return (false);
}

return (true);
}
//--></script>

<form action="post to script" method="post" onsubmit ="return Validator(this)">

<input size="4" name="amount">
<input type="submit" value="Go to check out">
</form>




Andrew Chang
Script to sell downloads: http://itemseller.scorpionsystems.net
Web Design & Scripting: http://scorpionsystems.net
Web & Image Hosting includes global SSL: http://scorpionwebhosting.com
Photographer Gallery Software: http://Photo-Seller.com
Become an affiliate and make money http://worldannounce....com/affiliates http://scorpionwebho...g.com/affiliate
Free Web Traffic: http://www.trafficsw...m/go.cgi?169137 , http://www.ts25.com/...ScorpionSystems

#3 jpwebdesigner

jpwebdesigner

    Member

  • Members
  • PipPip
  • 13 posts

Posted 10 March 2005 - 10:38 AM

the only issue with using the validator is that there are two radio buttons to choose from for an amount, so i can't make both of them required values. is there a way to make the continue link on the paypal error page point back to the donate page?

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by jpwebdesigner
[br]i need to set up a page that customers are redirected to if there is an error in one of the fields they filled out. for example, in the amount field, if they entered $12j.00 - instead of directing them to the paypayl error detected page, they will go back to the original website OR if they click the continue button on the paypal error detected page, they go back to the donate page. can this be done?
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

#4 Andrew Chang

Andrew Chang

    Average Member

  • Members
  • 738 posts

Posted 10 March 2005 - 11:11 AM

You are 100% correct in your case you would have to validate texta only if amount=texta

It will require some extra coding to do this. What I gave you was a basic example not ment for use with your code.

Andrew Chang
Script to sell downloads: http://itemseller.scorpionsystems.net
Web Design & Scripting: http://scorpionsystems.net
Web & Image Hosting includes global SSL: http://scorpionwebhosting.com
Photographer Gallery Software: http://Photo-Seller.com
Become an affiliate and make money http://worldannounce....com/affiliates http://scorpionwebho...g.com/affiliate
Free Web Traffic: http://www.trafficsw...m/go.cgi?169137 , http://www.ts25.com/...ScorpionSystems

#5 Andrew Chang

Andrew Chang

    Average Member

  • Members
  • 738 posts

Posted 10 March 2005 - 11:18 AM

the answer to your second question Can you make the continue link direct back to your site is yes

&cancel_return=http://partners-charity.net/donate_new_address.html

Andrew Chang
Script to sell downloads: http://itemseller.scorpionsystems.net
Web Design & Scripting: http://scorpionsystems.net
Web & Image Hosting includes global SSL: http://scorpionwebhosting.com
Photographer Gallery Software: http://Photo-Seller.com
Become an affiliate and make money http://worldannounce....com/affiliates http://scorpionwebho...g.com/affiliate
Free Web Traffic: http://www.trafficsw...m/go.cgi?169137 , http://www.ts25.com/...ScorpionSystems

#6 jpwebdesigner

jpwebdesigner

    Member

  • Members
  • PipPip
  • 13 posts

Posted 10 March 2005 - 12:01 PM

ok i did this, but it is not working...

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by Andrew Chang
[br]the answer to your second question Can you make the continue link direct back to your site is yes

&cancel_return=http://partners-charity.net/donate_new_address.html

Andrew Chang
Script to sell downloads: http://itemseller.scorpionsystems.net
Web Design & Scripting: http://scorpionsystems.net
Web & Image Hosting includes global SSL: http://scorpionwebhosting.com
Photographer Gallery Software: http://Photo-Seller.com
Become an affiliate and make money http://worldannounce....com/affiliates http://scorpionwebho...g.com/affiliate
Free Web Traffic: http://www.trafficsw...m/go.cgi?169137 , http://www.ts25.com/...ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

#7 Andrew Chang

Andrew Chang

    Average Member

  • Members
  • 738 posts

Posted 10 March 2005 - 12:05 PM

You may not have uploaded the change because it is not there

you have to add that bit in the URL in the script.

Andrew Chang
Script to sell downloads: http://itemseller.scorpionsystems.net
Web Design & Scripting: http://scorpionsystems.net
Web & Image Hosting includes global SSL: http://scorpionwebhosting.com
Photographer Gallery Software: http://Photo-Seller.com
Become an affiliate and make money http://worldannounce....com/affiliates http://scorpionwebho...g.com/affiliate
Free Web Traffic: http://www.trafficsw...m/go.cgi?169137 , http://www.ts25.com/...ScorpionSystems

#8 jpwebdesigner

jpwebdesigner

    Member

  • Members
  • PipPip
  • 13 posts

Posted 10 March 2005 - 12:12 PM

oops! it's working now thanks.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by jpwebdesigner
[br]ok i did this, but it is not working...

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by Andrew Chang
[br]the answer to your second question Can you make the continue link direct back to your site is yes

&cancel_return=http://partners-charity.net/donate_new_address.html

Andrew Chang
Script to sell downloads: http://itemseller.scorpionsystems.net
Web Design & Scripting: http://scorpionsystems.net
Web & Image Hosting includes global SSL: http://scorpionwebhosting.com
Photographer Gallery Software: http://Photo-Seller.com
Become an affiliate and make money http://worldannounce....com/affiliates http://scorpionwebho...g.com/affiliate
Free Web Traffic: http://www.trafficsw...m/go.cgi?169137 , http://www.ts25.com/...ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

#9 Andrew Chang

Andrew Chang

    Average Member

  • Members
  • 738 posts

Posted 10 March 2005 - 12:26 PM

You are very welcome

Andrew




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users