Forums
This topic is locked
Alert message won't work
25 Mar 2004 20:04:18 Lim Lim posted:
<cfset check_loop = 0 ><cfloop condition = "#check_loop# EQ 0">
<script>
alert("hi"

</script>
<CFQUERY NAME="DISPLAY_SELECTED_DATA" USERNAME="abc" PASSWORD="123" DATASOURCE="#DSN#" DBTYPE="ODBC">
SELECT * FROM abc_tbl Where ID=123
</CFQUERY>
<cfif #DISPLAY_SELECTED_DATA.status# EQ 1>
<cfset check_loop=1>
</cfif>
</cfloop>
For example, #DISPLAY_SELECTED_DATA.status# EQ 0 at first. But later i updated #DISPLAY_SELECTED_DATA.status# to 1. The loop cannot be ended. I want to set the status to 0 at first,
so that i now the visitor is here. Then kick him out of the particular page when i set it to 1. Please help