Community Forums 

Main Content

Form submission on 'page load'

    May 10 2012 16:45:04



    Join date : 2009-06-26      Posts : 52

    Is it possible to automatically submit a form (ie write to the shopping cart) when the user arrives at a page, without them having to click a submit button.

    essentially i'm looking to replace the line: <input type="submit" ... > with something that will submit the form on 'page load'.

    can't find any html type reference that will let me do this... anyone have any ideas?

    May 11 2012 05:45:18



    Join date : 2008-09-18      Posts : 3226

    I've placed a script at the top of the head area, you'll need to copy that, plus give your form an id value:

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.

    May 12 2012 14:43:45



    Join date : 2008-09-18      Posts : 488

    You can do a redirect and submit a url to the cart. That way you don't have to rely on any javascript.

    May 13 2012 09:07:30



    Join date : 2009-06-26      Posts : 52

    Thanks for the replies...

    GT - Coding works great!... installed and running live.

    anon - Thanks for your suggestion, havn't tried it out but i'll bear that one in mind if i need something similar.