Simple Javascript Form Submit

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
arunkar
Forum Commoner
Posts: 50
Joined: Mon Feb 25, 2008 10:37 pm

Simple Javascript Form Submit

Post by arunkar »

~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.


Hu Guys,

Im doing a simple javascript form submission but I get an error:

This is the code:

Code: Select all

    <form action="https://select.worldpay.com/wcc/purchase" method="POST" name="Citizen_Registration">
        <input type="hidden" name="instId" value="148271">
        <input type="hidden" name="cartId" value="">
        <input type="hidden" name="amount" value="10.00">
        <input type="hidden" name="currency" value="USD">
        <input type="hidden" name="desc" value="Global Village Citizen - Registration">
        <input type="hidden" name="MC_joomlaid" value="">
        <input type="hidden" name="MC_amountpaid" value="10.00">
 
        <input type="hidden" name="MC_process" value="true">
        <input type="hidden" name="MC_FromPage" value="Citizen Registration">
        <input type="hidden" name="testMode" value="0">
    </form>
 
    <!-- transStatus = Y or C for transaction call back page -->
<script language="javascript">
 
    document.Citizen_Registration.submit();
 
</script>
the error is document.Citizen_Registration is undefined

Code: Select all

document.Citizen_Registration.submit(); 
Any sugggestions to ovecome this guys?

thanks
Arun


~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Simple Javascript Form Submit

Post by VladSun »

There are 10 types of people in this world, those who understand binary and those who don't
Post Reply