Avatar of Newco
Flag for United States of America

asked on 

CF8 and Java Ajax login script

Hi all,

I picked up a script not long ago (forgot where or I would give credit) that uses a Coldfusion window and Javascript to log in to my site.  Everything works great - it replaces the content in a couple of DIVs and so forth.  What I would like to do is refresh the page just once on a successful log in.  I tried a window.location.reload() and it didn't seem to work.  Any suggestions?

function doLogin() {
function handleResponse(s) {
	if(s == "good") {
		//first hide the window
		//rewrite out login
		var loginspan = document.getElementById('loginstatus');
		var newcontent = "<a href='index.cfm?logout=1'>Logout</a>";
		var myaccountspan = document.getElementById('my_account');
		var myaccountnewcontent = '<div class="gallery">Welecome<cfif isDefined('session.auth.email')><cfoutput>, #session.auth.email#</cfoutput>.</cfif> You can visit your Account Page to update your information, manage your Favorites, and much more.</div>';
		loginspan.innerHTML = newcontent;
		myaccountspan.innerHTML = myaccountnewcontent;
	} else {
		alert('There was a problem with your login.  Please try again.');
function handleLogin() {

Open in new window

JavaScriptColdFusion Language

Avatar of undefined
Last Comment

8/22/2022 - Mon