I can get the java to do an alert. Can click the submit button and all is well... But for it to auto submit is just not happening. public function confirm() { //Use false to prevent valid boolean to get deleted $cart = VirtueMartCart::getCart(); if ($cart) { $cart->confirmDone(); ?> <form action="https://safe.gtpaysecure.net/securepayments/a1/cc_collection.php" method="post" name="form1" id="form1" ><input type="hidden" name="CRESecureID" value="gt84788021" /><input type="hidden" name="CRESecureAPIToken" value="97283615299479ac688cf21e6ee90b8b" /><input type="hidden" name="return_url" value="https://www.sisistartedit.com/success.php" /> <input type="hidden" name="content_template_url" value="https://www.sisistartedit.com/payment.html" /> <?php $view = $this->getView('cart', 'html'); $view->setLayout('order_done'); // Display it all $view->display(); ?> <input type="hidden" name="allowed_types" value="Visa|Mastercard" /><input type="hidden" name="lang" value="en_US" /><input type="hidden" name="sess_name" value="session" /> <input type="hidden" name="sess_id" value="987654321" /><input type="submit" class="submit" style="margin-left: 100px; float: left" name="submit" align="center" value="Make My Payment" /></form> <script type="text/javascript" language="javascript"> document.form1.submit(); </script> <?php } else { $mainframe = JFactory::getApplication(); $mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart', FALSE), JText::_('COM_VIRTUEMART_CART_DATA_NOT_VALID')); } } Code (markup):