Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hide web pages until a pay pal payment!

    Hello Everyone;

    I'm new to the forum and wonder if I can receive some coding help.

    I am trying to hide my ebook pages of my website until I receive a pay pal payment and my code is not working using Public Void Hide and Show or the Hide/Show functions period.

    My code is this... what am I doing wrong???

    <script language= "Javascript">

    bpm= (href= "http://www.marquettal.tripod.com/amnesia");
    paypal= (href= "http://www.paypal.com/cgi-bin/wbscr");
    bpmindex= (href= "http://www.marquettal.tripod.com/index.html");

    Public Void Hide(){
    bpm.hide();

    while or if paypal != null;

    else

    Public Void Show(){
    bpm.show();
    }

    </script>

  • #2
    Regular Coder ArcticFox's Avatar
    Join Date
    Jan 2004
    Location
    Vostok Station, AQ
    Posts
    602
    Thanks
    35
    Thanked 3 Times in 3 Posts

    Internet Explorer

    Doesn't Paypal have a redirect page after payment? Like a "Thank You" page...
    <div> - putting your mind in a box since 1997

  • #3
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts
    ... This script is better written in Server Side Script/CGI

    but

    <script language= "Javascript">

    bpm= (href= "http://www.marquettal.tripod.com/amnesia");
    paypal= (href= "http://www.paypal.com/cgi-bin/wbscr");
    bpmindex= (href= "http://www.marquettal.tripod.com/index.html");

    Public Void Hide(){
    bpm.hide();

    while or if paypal != null;

    else
    Public Void Show(){
    bpm.show();
    }

    </script>
    Too many mistakes, I would do it in PHP as:

    PHP Code:
    <? 
        
    if (something == true) {
            echo 
    "The result";
        } else {
            echo 
    "The false result";
        }
    ?>
    Same in javascript but in Server it generates HTML while Javascript changes the code temporarely
    Last edited by DELOCH; 08-18-2006 at 07:24 AM.

  • #4
    Regular Coder ArcticFox's Avatar
    Join Date
    Jan 2004
    Location
    Vostok Station, AQ
    Posts
    602
    Thanks
    35
    Thanked 3 Times in 3 Posts

    Internet Explorer

    What if they have no server-side access?
    <div> - putting your mind in a box since 1997

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,457
    Thanks
    0
    Thanked 632 Times in 622 Posts
    You can't conceal web pages without using server side processing to do the checking.

    With Javascript all someone has to do is read your page source to find out where the "hidden" page is.

    The best that you could do without server side access is to set up the hidden page as the thankyou page for the Paypal call and use the encrypted source option that Paypal provide to make it impossible for someone to obtain the address of the page from the source. That way the page is hidden until either the person makes the payment or someone tells them where to find it.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #6
    Regular Coder ArcticFox's Avatar
    Join Date
    Jan 2004
    Location
    Vostok Station, AQ
    Posts
    602
    Thanks
    35
    Thanked 3 Times in 3 Posts

    Internet Explorer

    Quote Originally Posted by felgall
    The best that you could do without server side access is to set up the hidden page as the thankyou page for the Paypal call and use the encrypted source option that Paypal provide to make it impossible for someone to obtain the address of the page from the source. That way the page is hidden until either the person makes the payment or someone tells them where to find it.

    Exactly!
    <div> - putting your mind in a box since 1997

  • #7
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Los Angeles
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Hide web pages until a pay pal payment!

    Thank you all very much...

    I will look into using PHP Code...

    The mistakes are what for the script that I wrote? I took it from the book and from another script that someone was using. Even though I did try many ways of coding.

    Help me out. I can't find the right book to resources to tell me the right thing.

  • #8
    Regular Coder ArcticFox's Avatar
    Join Date
    Jan 2004
    Location
    Vostok Station, AQ
    Posts
    602
    Thanks
    35
    Thanked 3 Times in 3 Posts

    Internet Explorer

    If you have server-side access and can use PHP, that would be your best option.

    If you haven't the time or energy to learn code, or if you need a quick solution then having your eBook page as the "Thank You" page on a PayPal redirect may be the better idea.
    <div> - putting your mind in a box since 1997

  • #9
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts
    yeah, like i said the only smart thing is by using CGI/SSI/SSS for it, still PHP is not the only one, if you have trouble with the C++ Syntax you can use ASP/.NET or such.

    good luck ^_^

  • #10
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,373
    Thanks
    8
    Thanked 1,075 Times in 1,066 Posts
    Look at "cubecart" .... free shopping cart system that
    uses PayPal and offers the option to sell software downloads
    as well as tangible goods. The free version requires you keep
    their branding on the pages, but it works just fine.

    http://www.cubecart.com/site/home/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •