locked
PayPal button creates form within aspx master page form RRS feed

  • Question

  • I'm using a Master Page which obviously must have a form tag wrapping the editable content in order to work (actually the form encompasses everything between the body tags of the master page).

    A PayPal "pay now" button (whether created through the PayPal site or through the EW add-in) creates a new form. So now I have a form within a form on my page.

    I had this actually working on a page, but it isn't right. What I think I need to do is convert the PayPal button into a control or something? But I'm lost on how to go about that.

    Here's the code from the PayPal button that was generated by the WebAssist add-on, if someone could hack it into something that's not a form anymore but which will work on the aspx page within existing "Form1" from the Master Page: (personal info removed obviously)

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick" />
    <input type="hidden" name="business" value="me@myemail"/>
    <input type="hidden" name="item_name" value="" />
    <input type="hidden" name="item_number" value="" />
    <input type="hidden" name="amount" value="" />
    <input type="hidden" name="currency_code" value="USD" />
    <input type="hidden" name="shipping" value="" />
    <input type="hidden" name="shipping2" value="" />
    <input type="hidden" name="handling" value="" />
    <input type="hidden" name="image_url" value="" />
    <input type="hidden" name="return" value="http://www.whatever.com/thanks.aspx" />
    <input type="hidden" name="cancel_return" value="http://www.whatever.com/cancel.aspx" />
    <input type="hidden" name="undefined_quantity" value="0" />
    <input type="hidden" name="receiver_email" value="me@myemail.com" />
    <input type="hidden" name="no_shipping" value="1" />
    <input type="hidden" name="no_note" value="1" />
    <input type="hidden" name="bn" value="WebAssist.ExpressionWeb.1_0_0" />
    <input type="hidden" name="mrb" value="R-3WH47588B4505740X" />
    <input type="hidden" name="pal" value="ANNSXSLJLYR2A" />
    <input type="image" name="submit" src="http://images.paypal.com/images/x-click-but6.gif" alt="Make payments with PayPal, it's fast, free, and secure!" />
    </form>
    Friday, February 29, 2008 8:18 PM

Answers

  • Thanks for your reply.

    I answered my own question after posting the message - I was creating a Paypal button on a child page of an asp.net Master Page (different than a dwt).

    I did not realize that the form that is automatically placed on the Master Page is quite unnecessary for the functionality of the master/child page relationship. I simply deleted that form from the master page, and now that I don't have a form within a form, everything is hunky dory.

    As to why I'm using a form for this in the first place: I'm not a programmer (not yet at least; after taxes are done I intend to get serious about studying C Sharp) so I just used a plug-in from WebAssist that was created for this purpose to keep it simple.

    pg
    Friday, March 28, 2008 12:28 AM

All replies

  • Why would you use a form for this?

    Normally a div or more are used to contain editable content in a dwt.


    Regards Jens Peter Karlsen.

    Friday, March 28, 2008 12:22 AM
  • Thanks for your reply.

    I answered my own question after posting the message - I was creating a Paypal button on a child page of an asp.net Master Page (different than a dwt).

    I did not realize that the form that is automatically placed on the Master Page is quite unnecessary for the functionality of the master/child page relationship. I simply deleted that form from the master page, and now that I don't have a form within a form, everything is hunky dory.

    As to why I'm using a form for this in the first place: I'm not a programmer (not yet at least; after taxes are done I intend to get serious about studying C Sharp) so I just used a plug-in from WebAssist that was created for this purpose to keep it simple.

    pg
    Friday, March 28, 2008 12:28 AM