Anyone know how to auto-submit a form?

6 replies
Hi guys,

I'm hitting a brick wall and can't make this work. I want to be able to automatically add buyers to my customer list.

I have figured out how to get ClickBank to pass name and email back to my thank you page and I can use PHP to request the variables and echo them on a test page. That's all cool.

I can create a form and have the variables show up in the form. So everything is good, except I can't get the automatic submission to work.

This code is supposed to work:

Code:
<script type="text/javascript" language="JavaScript"><!--
document.FormName.submit();

//--></script>
Any ideas what might be going wrong? As a test I'm using my standard aweber form, but I'm adding in the form name="MyForm" since the form needs a name in order for the javascript to autosubmit.

It's just not working ... and I'm really scratching my head on this one.
#autosubmit #form
  • Profile picture of the author Voon
    From what I see in your javascript, there's nothing to trigger the .submit() function.

    How about
    HTML Code:
    <script type="text/javascript" language="JavaScript"><!--
    window.onload = autosubmit;
    function autosubmit() {
    document.FormName.submit();
    }
    //--></script>
    But still, is this the best way to add customer to your list?
    If customer don't have javascript enabled, the auto submit function will fail.
    Or if customer closed their browser before entering thank you page, then you would missed the data.

    Aweber has another way of receiving Clickbank payment notification then auto process customer detail to your list.
    Sorry, I can't post URL yet. So, do a search for 'How Do I Integrate Clickbank' in their knowledge base to find out.
    Signature

    .

    {{ DiscussionBoard.errors[1331953].message }}
  • Profile picture of the author zapseo
    if you are doing this for a product you are creating, it would be worth doing ... otherwise, there are products like dlguard and easyclickmate that will take care of this for you...

    Live JoyFully!

    Judy
    {{ DiscussionBoard.errors[1332026].message }}
  • Profile picture of the author RichPirate
    Your code should be working.

    I would check the JavaScript error console in your browser. This should give you some insight in to why it's not working.
    {{ DiscussionBoard.errors[1332251].message }}
  • Profile picture of the author Chris Thompson
    Hi everyone,

    Thanks for the suggestions.

    1) I use DLGuard and aweber. I know that DLGuard can send a purchase notification to the aweber list address and aweber can parse the email. It sorta works and only a portion of customers bother to click on the confirmation link.

    2) I'm planning to auto-remove people from my prospect list when they become customers. This way they never again get a promotion to buy a product they already own. This is why I want to be sure they are on my list.

    Thanks for the comment about javascript being disabled, and how that would hurt my objective.
    {{ DiscussionBoard.errors[1334225].message }}
  • Profile picture of the author Jay Jennings
    Originally Posted by Chris Thompson View Post

    Hi guys,

    Code:
    <script type="text/javascript" language="JavaScript"><!--
    document.FormName.submit();
    
    //--></script>
    Any ideas what might be going wrong? As a test I'm using my standard aweber form, but I'm adding in the form name="MyForm" since the form needs a name in order for the javascript to autosubmit.
    If you really named your form "MyForm" then that's your answer -- you're not telling MyForm to submit, you're telling FormName to submit.

    Jay Jennings
    {{ DiscussionBoard.errors[1387878].message }}

Trending Topics