Hi All,
I am trying to do the following:
<script language="javascript">
<cfquery name="test" datasource="test">
select a from table1
</cfquery>
<cfif #test.recordcount# neq "0">
document.forms[0].method = "post";
document.forms[0].target = "_blank";
document.forms[0].action = "index.cfm";
document.forms[0].submit() ;
<cfelse>
document.forms[0].method = "post";
document.forms[0].target = "_blank";
document.forms[0].action = "index2.cfm";
document.forms[0].submit() ;
</cfif>
</script>
When the record count is not zero, I am able to navigate correctly, but the
javascript in cfelse is not recognized. In one place it works fine, but in one
of the places, the javascript within cfelse does not work. Can anyone point out
or let me know what could be the possible problem.
Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333352
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm