Project

General

Profile

« Previous | Next » 

Revision 6647

Added by Jing Tao about 13 years ago

Using the method which reloads the page after sending login. This will fix an issue that the search function couldn't get the session id after login.

View differences:

lib/style/skins/sanparks/sanparksLogin.js
43 43

  
44 44
}
45 45

  
46
function submitLoginFormIntoDivAndReload(servletUrl, formObj, divId) {
47

  
48
	//var formObj = document.getElementById(formId);
49
	var shortUserName = formObj.shortusername.value;
50
	//alert("starting userName: " + shortUserName);
51
	var organization = formObj.organization.value;
52
	//alert("organization: " + organization);
53
	formObj.username.value = createLdapString(shortUserName, organization);
54
	//alert("ending userName: " + formObj.username.value);
55
	var loggingInContent = "<table><tr><td width='600px' align='center'><p>logging in</p></td></tr></table>"
56
	document.getElementById(divId).innerHTML = loggingInContent;
57
	
58
	submitFormObjIntoDivAndReload(servletUrl, formObj, divId);
59

  
60
}
61

  
46 62
function submitLogoutFormIntoDiv(servletUrl, formObj, divId) {
47 63
	var loggingOutContent = "<table><tr><td width='600px' align='center'><p>logging out</p></td></tr></table>"
48 64
	document.getElementById(divId).innerHTML = loggingOutContent;
lib/style/skins/sanparks/sanparksLogin.jsp
156 156
		<a href="<%= CONTEXT_URL %>/cgi-bin/ldapweb.cgi?cfg=sanparks" target="_new" />
157 157
		<span class="regtext"> (request an account...)</span>
158 158
		</h3>
159
		<form name="loginForm" id="loginForm" onsubmit="submitLoginFormIntoDiv('<%= SERVLET_URL %>', this, 'loginSection')">
159
		<form name="loginForm" id="loginForm" onsubmit="submitLoginFormIntoDivAndReload('<%= SERVLET_URL %>', this, 'loginSection')">
160 160
		  <input name="qformat" type="hidden" value="sanparks" />
161 161
		  <input name="action" type="hidden" value="login"/>
162 162
		  <table>

Also available in: Unified diff