Proprietary Form with Javascript is not working

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
2/6/2014 2:20:05 PM
Total Posts 1

Proprietary Form with Javascript is not working

I am trying to insert a form that will log a user into another site.  This form requires a javascript functions to work properly.  When the form is submitted the page refreshes the current MojoPortal site instead of moving to the intended destination.  My test site is located at 

When this javascript and form are setup in a standard html file everything works properly. 

I have placed this script at the end of the <head> section in layout.Master:
<script language="javascript" src="/ClientScript/banking.js" type="text/javascript"></script>

I added banking.js to the appropriate ClientScript directory.

Below is the form code I have placed in the left column source code:

<form action=";Rt=031901097&amp;LogonBy=Connect3" autocomplete="OFF" id="Form1" method="post" name="Remote" onsubmit="return doLoginRefresh()"><input id="Hidden1" name="nmUID" type="hidden" /><input id="Hidden2" name="nmPWD" type="hidden" /><input id="Hidden3" name="nmRTN" type="hidden" value="031901097" />
<div><label class="radio" for="ecom"><input checked="checked" id="ecom" name="loginTo" type="radio" value="ecom" /> Retail Online</label></div>

<div><label class="radio" for="ecorp"><input id="ecorp" name="loginTo" type="radio" value="ecorp" /> Business Online</label></div>

<div><label for="accessId">Access ID:</label> <input id="accessId" maxlength="19" name="AccessID" size="15" /></div>

<div><input id="Submit1" name="Submit1" type="submit" value="Log In" /></div>


Thanks for any help,

First Time MojoPortal Newbie

2/6/2014 2:36:00 PM
Total Posts 18439

Re: Proprietary Form with Javascript is not working


In ASP.NET WebForms (which mojoPortal is built on) there can be one and only one form element in the page and one already exists so you cannot add your own, if you put a form inside an html content feature for example you are really putting a form inside of another form that is already there and nested form elements is not valid html.

The solution is to make a simple custom module using an <asp:Button , you can set the PostBackUrl property on the button and that will set the action on the existing form when the button is clicked.

See the article Building A Simple PayPal Buy Now Button which shows how to do this since the PayPal button needs to post to an external url.

Hope that helps,


You must sign in to post in the forums. This thread is closed to new posts.