Below is a cfm file that I am using for validating usernames and
passwords from a database. Everything in that respect is working just
fine. If the login is successful the user gets a message saying
successful login and launches and new window containing the application.
The problem is that for some reason the entire "success" message does
not appear in the browser window. You will see in the code below after
the <CFELSE> that there is the "Database Login Successful!!..." Well,
that is the only part of the message that I see. The remaining text does
not appear. The piece of Javascript I have in there where I am
relocating to the new window seems to have and effect on wheter it
appears or not. If I remove the script, the text appears and when I put
it back it disappears. Any ideas??
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<cfoutput>
<!--
function newWindow(){
launchWin = window.open('lsar.cfm?user=#form.username#',
'launchWin',
'width=790,height=543,screenX=0,screenY=0,top=0,left=0')
}
//-->
</cfoutput>
</SCRIPT>
<cfquery name="Validate" datasource="lsars">
select * from taavon.users
where username = '#form.username#' and
password = '#form.password#'
</cfquery>
<cfif validate.recordcount is 0>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
alert ('Database Login Unsuccessful!! You have typed in an
\n invalid Username or Password.');
location.href = ('index.cfm');
//-->
</SCRIPT>
<cfelse>
<font face="arial">
<strong>Database Login Successful!!
<br>
<br>
<font size="2"> The Letter Scanning and Routing System has been started
in another window. You no longer need this window open. </font>
</strong>
</font>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
location.href='javascript:newWindow()'
//-->
</SCRIPT>
</cfif>
</body>
</html>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.