SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict Owz2004's Avatar
    Join Date
    Mar 2004
    Location
    U.K (Wales)
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Query regarding form submit

    Hi guys,

    I've got a quick query, I have a form which has a file upload element, contact details fields and a paypal checkout button http://icomworks.co.uk/canvaspayform.html

    is it possible to process the whole order off the paypal button?

    I.e upload the image to our server, send contact information with validation to cgi bin and also process the canvas size? order off the one paypal button?

    if so how do I trigger the javascripts off the one button?

    it currently has just the one function:
    HTML Code:
    <input type="image" src="http://www.icomworks.co.uk/img/paypal.jpg" border="0" name="submit" onClick="CalculateOrder(this.form)" alt="Make payments with PayPal - it's fast, free and secure!">
    can i tie in all the other functions into that same onclick property?

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use an iframe to do the upload/contact info and when the page returns successful submit the paypal form.


  3. #3
    SitePoint Addict Owz2004's Avatar
    Join Date
    Mar 2004
    Location
    U.K (Wales)
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So if i put the contact and upload form in one iframe and the canvas/Paypal form in a different iframe how would I go about coding the two? are there any tutorials that can help do this?

    I'm also looking for a script that will allow me to upload the image to a specific directory on my server any recommendations??

    thanks

  4. #4
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    basically, you'd have some way of uploading the file within another frame. With this, you can post data and store it. If that is complete, you can write javascript to access the parent page that automatically posts the paypal form.

    You could also use an Ajax Upload, which will also post data. Once this is complete you can post the paypal form.


  5. #5
    SitePoint Addict Owz2004's Avatar
    Join Date
    Mar 2004
    Location
    U.K (Wales)
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im pretty new to javascript having just bought the sitepoint "simply javascript" book..

    This sounds like it might be a step to far for me at the minute... Although Ive just had a look at the ajax upload solution and that looks like it might not be to bad to implement...

    so to summarise I'd put the contact and upload form elements into one frame.. and then when the user filled them in and submitted the data a bit of javascript code would tell the page to load the bottom portion of my form (canvas options and paypal button?)

  6. #6
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We all have to start somewhere...

    Using an iframe is the best method for starters. All you need to do is put your form in there and when you submit the form inside the iframe, it will upload the data and post your contact details.

    Once that finishes and posts back, you can use javascript to capture this and start the paypal post.


  7. #7
    SitePoint Addict Owz2004's Avatar
    Join Date
    Mar 2004
    Location
    U.K (Wales)
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the adivce, will have to do a bit of research and reading to get this up and running i guess...

    Will post back if i can provide a solution...

    thanks again...


Tags for this Thread

Bookmarks

Posting Permissions

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