close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to send a form on page load

Thread began 5/01/2015 11:11 am by s.joiner74419001 | Last modified 5/11/2015 7:29 pm by Ray Borduin | 1290 views | 20 replies |

s.joiner74419001

How to send a form on page load

I have a success page that the user is directed to from paypal after making a payment from the paypal button on a web page. I need to update the users details in a database with a value of paid which I have tried to do using a form with a hidden element with the value 'paid' the form uses update record behaviour with a trigger of current page submit and javascript like this:

function load()
{
document.forms["paid"].submit();
}

But when the page loads it doesn't send the form or update the record.

Help please!

Sign in to reply to this post

Ray BorduinWebAssist

A few things.

1) Just because you define a function called load() doesn't mean it will be called on load.
2) If it was called on load the page would be stuck in an infinite loop as the page would submit, re-load, and re-submit indefinitely
3) I don't think you need a form submit or hidden form element at all. Just use the "before page load" trigger in the update record server behavior and set the value to: paid directly from the Server Behavior.

Sign in to reply to this post

s.joiner74419001

Ok thanks Ray, another issue I have is the user us directed to PayPal after completing a membership form and then directed back to the success page where I want to update the record from. Will the session keep so I can send the value paid to the correct members I'd (session) .. Hope this makes sense!

Sign in to reply to this post

Ray BorduinWebAssist

Yes... you should be using Paypal Express checkout for this to work properly.

Sign in to reply to this post

s.joiner74419001

Ok Ray. Not sure If I have the ability to do this so where do I start with this. Should I be creating a system with eCart? To explain my required process. the user can visit our website to become members by completing an application form which includes username and password creation. I custom built this form with the help of 'Databridge'. it is on submitting the form, the user is then directed to a confirmation page where there basic details are displayed with the price of membership. It is from here I want the user to be taken to a payment system ( So as you suggested, pp express checkout ). Subsequently the form is sent to a database and in particular a value of 'form complete' is sent to the 'status' column. As I described previously I want this column to be updated to 'Paid' or 'Cancelled' depending on the result of the transaction. The reason I need these values is to secure access to the members area of our web-site to 'Paid' members only. I was previously trying to achieve my goal by using paypal buttons which is probably why I was getting stuck with this.

I have eCart but I am completely lost on Where to go after creating an eCart object and what components I need and how I would use my current application form and database. Plus a lot of the pages created look to be pointing to creating product pages but we provide a service and so need a single option to purchase, therefore add to cart isn't necessary, we just need subscribe. is this easy to customise?

This might require a premium support ticket if so thats fine just say and I will put in a request.

Thanks in advance.

Sign in to reply to this post

Ray BorduinWebAssist

I think the easiest solution would still be to use eCart. You can use an add to cart server behavior, create the view cart page, and run the checkout wizard to complete the checkout process. Since you are only selling one item and don't really need a cart, you can have the add to cart button link directly to the checkout page and never actually view the cart page.

Sign in to reply to this post

s.joiner74419001

Hi Ray,

I am experiencing a major fault with the checkout wizard as follows:

Firstly I will explain what I am doing.

I first apply the add to cart server behaviour to my application form page using the submit form button as the trigger. in the behaviour I re-direct to the view-cart page ( memb-payment.php). On this page I used the Display manager to add the cart display and then add a checkout button. I then open the checkout wizard and complete the settings. ( using sandbox API credentials ). After completion I proceed to click 'Finish' and this is where the issue happens.

It creates all there numerous pages, but extra untitled pages, and then crashes as shown on attachment.

The following pages are created:

Untitled-1.php - This appears to be the order confirmation page.
Untitled-2.php - Blank html document
Untitled-3.php - This appears to be the checkout form.
confirm.php - Blank html document
confirm_cart.php - Blank html document
checkout.php - Blank html document
checkout_failure.php - Appears to be complete
checkout_success.php - Appears to be complete

Please help.

You're probably aware that I am in the UK and so its difficult to get the support from yourselves when required because of the time delay. We are desperate to get this up and running asap. my laptop is currently at fault so I will be taking my office iMac home so we can hopefully get this resolved this evening.

Thanks in advance.

Sign in to reply to this post

Ray BorduinWebAssist

Try clearing the cache .dat file and running the wizard again.

Also if you get a message while running the wizard that says "This file has been edited outside of Dreamweaver would you like to reload" make sure to click "no".

If you continue to have this problem, please post Skype contact information and we can try to come in early to catch you during business hours later this week to look into it with you.

Sign in to reply to this post

s.joiner74419001

Hi Ray,

Ive tried deleting the Cache.dat file numerous times but nothing changes. Ive re-installed and still no joy. Are you able to trouble sheet this evening? (I'm 5 hours ahead i think )

Skype name in PM

Sign in to reply to this post

s.joiner74419001

Hi Ray.

I'm in office until 4:30pm BST (11:30am EST) and would be great if we could try and solve issue either before this time or some time this evening, any time from about 8:00pm BST (3:00pm EST )

Thanks

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...