flash form 中关于alert框的应用-Flash教程
来源:查爾斯實驗室 作者:查爾斯
更新时间:2008-03-04
点击:
关于在flash form中的判定应该,coldfusion中应该都有很优秀,漂亮的提示,但有的时候要用到弹出窗口来给客户来决定是继续做下去或是取消当前操作这样的情况,所以就是类似JS中的confirm的功能哦!
具体实施是这样来改造flash form的alert框的。
alert(\"Are you sure you want to remove all records?\", \"Warning\", mx.controls.Alert.OK | mx.controls.Alert.CANCEL, myClickHandler); 在controls中加入两个warning要用到的button,来对其进行改造,让本身一个按钮的alert变成两个,这个技巧是在ASFUSION上得到的灵感,假如我的flash as够熟悉的话,我大概可以做的更出色些,所以还需努力,
<cfsavecontent variable=\"showAlert\"> var myObj = {}; var myClickHandler = function (evt){ if (evt.detail == mx.controls.Alert.OK){ alert(\"Records deleted\",\"Completed\"); }}alert(\"Are you sure you want to remove all records?\", \"Warning\", mx.controls.Alert.OK | mx.controls.Alert.CANCEL, myClickHandler);</cfsavecontent>
<cfform name=\"myform\" height=\"300\" width=\"400\" format=\"Flash\" timeout=\"0\" > <cfformgroup type=\"hbox\">
<cfinput type=\"Button\" name=\"myBtn\" onClick=\"#showAlert#\" value=\"Show Alert\" />
具体实施是这样来改造flash form的alert框的。
alert(\"Are you sure you want to remove all records?\", \"Warning\", mx.controls.Alert.OK | mx.controls.Alert.CANCEL, myClickHandler); 在controls中加入两个warning要用到的button,来对其进行改造,让本身一个按钮的alert变成两个,这个技巧是在ASFUSION上得到的灵感,假如我的flash as够熟悉的话,我大概可以做的更出色些,所以还需努力,
<cfsavecontent variable=\"showAlert\"> var myObj = {}; var myClickHandler = function (evt){ if (evt.detail == mx.controls.Alert.OK){ alert(\"Records deleted\",\"Completed\"); }}alert(\"Are you sure you want to remove all records?\", \"Warning\", mx.controls.Alert.OK | mx.controls.Alert.CANCEL, myClickHandler);</cfsavecontent>
<cfform name=\"myform\" height=\"300\" width=\"400\" format=\"Flash\" timeout=\"0\" > <cfformgroup type=\"hbox\">
<cfinput type=\"Button\" name=\"myBtn\" onClick=\"#showAlert#\" value=\"Show Alert\" />
相关Flash教程:
最新评论:
评论加载中....
发表评论:不能超过250字节,请自觉遵守互联网相关政策法规.
- 昵称: 验证:







