javasharp,
Thats not at all what Im after. I have the code written, its a web based email proggie... I just need the flash within it to behave a certain way.
-Rick
Main Topics
Browse All TopicsHello,
I am writing a web based email app that uses the flash capabilities in Coldfusion. In this particular instance I am having problems with the behavior of cfgrid. First I have a checkbox which is intended to be clickable so that the user can choose messages and delete them or move them to another message folder. Then if the user clicks on the subject line cell of the grid the user should be taken to another screen (via a specific url) where they can view the message. How do I accomplish this behavior? The correct answer is worth 500 points.
Thanks,
Rick
Here is my code as you can see I have a onchange even commented out, but if I enable it (this should cause the user to go to the view mail cfm) the flash doesnt render. But it will work if I take the grid out of edit mode:
<cfform name="#application.applica
<cfformgroup type="tabnavigator" name = "mytab" id="mytab">
<cfformgroup type="page" label="Inbox" id= "kt1" enabled = "true">
<cfformgroup type="hbox">
<cfgrid
name="Inbox"
<!----onchange="getUrl('ma
height=400
width=550
autoWidth=yes
align=center
colheaderfont=verdana
colheaderfontsize=10
colheaderbold=yes
font=verdana
fontsize=10
rowheaders=no
selectmode="edit"
<!----query="getemailheade
notSupported="ExacTrack Requires Macromedia Flash. Please install Macromedia Flash.">
<cfgridcolumn Name="select" Header="" width="35" Type="Boolean" dataalign=center>
<cfgridcolumn name="From" header="From" headeralign=center width=105>
<cfgridcolumn name="Subject" header="Subject" headeralign=center width=330>
<cfgridcolumn name="Date" header="Date" headeralign=center width=75>
<cfgridcolumn name="id" header="id" width=10>
<cfloop query=getemailheaders>
<cfset rdate = dateformat(date,'mm/dd/yyy
<cfgridrow data="0,#from#,#subject#,#
</cfloop>
</cfgrid>
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
oh crap... just wrote this long answer and XP screwed me by opening a browser over it and I lost it... anywhoo... no there is not a way to do exactly what you want to do (you don't know how badly I wish there was) but there are some close possibilities:
First go here: http://www.cfform.com/flas
(a great place for tips too if you haven't been to CFFORM before).
Next go here: http://www.asfusion.com/bl
(also a great place)
I wrote all this code, etc... in my last answer and I don't feel like doing it again unless you're still stumped. Basically the solution I've used it to merely have a hidden section of the form (cfformgroup) which displays the message in your case (or detail info in mine). It also has a set of buttons that are bound to links that pass the ID of the selected record from the grid (wont work if you have the grid set to edit) and in another case simply a dropdown menu and a button that is inactive until something is selected in the grid. So the user in that case simply selects the row they wish to work with and then the action to perform from the cfselect at the bottom and then clicks the button... at which time they are taken to an action page which includes all code required for each of the menu functions (in a cfswitch). So in an email app you could have either buttons that all submit but with different values like 'reply', 'forward', 'read', 'delete', etc... and then on the action page code which causes that page to process which ever action you wish. you can even make the possibility of multiselect function as shown at the links above with checkboxes. Unfortunately I can't figure out how you can have multiple links on a single row, and neither can any of the 'gurus' who are all infinitely smarter than I am.
Perhaps you will find the holy grail yourself, and if you happen to please let both myself and Macromedia/Adobe know because I've asked they repeatedly and no one can figure out how - they told me it can't at the moment.
onchange is not valid on a cfgrid.
Populate your cfgrid using the query attribute rather than the loop you currently have. The reason for this is that the form will only have to compile once when using the query attribute, whereas the loop will cause the form to recompile everytime the form is accessed.
You can't get the popup to display as soon as someone clicks on the subject, but what you can do is add a "view" button to your form, which calls a function onClick that will display the message in a new window. Its a pretty simple function.
function displayEmail(EmailID:Numbe
getURL('displayEmail.cfm?E
}
To call it just use onclick="displayEmail(Inbo
<cfinput type = "button" name="ViewEmail" width="100" value = "View Email" onclick="displayEmail(Inbo
You will need to do something similar with a delete button to go with your checkboxes.
OnChange is certainly totally valid on a CFGRID. And you can read any of the values of the selected row when it's clicked too.
So when a user clicks a row this will trigger onChange, you then read any values (hidden or not) and use them to decide what to do next.
For example, I use onChange to activate an otherwise disabled button so that the user must click a row before they can click "continue".
<cfgrid name="myGrid" query="myData" sort="yes" appendkey="yes" selectmode="row" enabled="yes" visible="yes" format="flash" onchange="continueBtn.enab
<cfgridcolumn name="messageID" display="no">
<cfgridcolumn name="messageSubject" header="Name" display="yes" select="yes">
<cfgridcolumn name="recordTimeStamp" header="Time Stamp" display="yes" width="125" select="no">
</cfgrid>
<cfinput type="submit" name="continueBtn" value="Continue >>>" width="270" height="40" enabled="false">
For more complex usage, you can write a function earlier in the page and then trigger that function using the onChange event in the cfGrid.
So for your URL task, you can do this...
<cfformitem type="script">
getMessage = function(){
thisMessageID = myData.selectedItem.messag
getURL("index.cfm?layout=s
}
</cfformitem>
<cfgrid name="myGrid" query="myData" sort="yes" appendkey="yes" selectmode="row" enabled="yes" visible="yes" format="flash" onchange="getMessage();">
<cfgridcolumn name="messageID" display="no">
<cfgridcolumn name="messageSubject" header="Name" display="yes" select="yes">
<cfgridcolumn name="recordTimeStamp" header="Time Stamp" display="yes" width="125" select="no">
</cfgrid>
btrevarthen,
ok so I totally understand what your saying, and knew that I could use an onChange event. But the question is how do I detect which cell of a grid has been clicked, and invoke a response (checking or unchecking a checkbox) or if the subject line field is clicked open the next url?
Thanks,
Rick
Here ya go. I made a stand-alone version since I don't have your data.
Clicking the checkbox does not selected the row, so you'll only trigger the onChange for the cfGrid when a row is selected.
<cfform name="my_navForm" timeout=20 format=flash width=590 height=520 skin="haloBlue" >
<cfformgroup type="tabnavigator" name = "mytab" id="mytab">
<cfformgroup type="page" label="Inbox" id= "kt1" enabled = "true">
<cfformgroup type="hbox">
<cfgrid
name="Inbox"
onChange="viewBtn.enabled=
<!--- onchange="getUrl('manager.
height=300
width=550
autoWidth=yes
align=center
colheaderfont=verdana
colheaderfontsize=10
colheaderbold=yes
font=verdana
fontsize=10
rowheaders=no
selectmode="edit"
<!----query="getemailheade
notSupported="ExacTrack Requires Macromedia Flash. Please install Macromedia Flash.">
<cfgridcolumn Name="select" Header="" width="35" Type="Boolean" dataalign=center>
<cfgridcolumn name="From" header="From" headeralign=center width=105>
<cfgridcolumn name="Subject" header="Subject" headeralign=center width=330>
<cfgridcolumn name="Date" header="Date" headeralign=center width=75>
<cfgridcolumn name="id" header="id" width=10>
<cfloop index="index" from="1" to="10">
<cfset rdate = dateformat(now(),'mm/dd/yy
<cfgridrow data='0,"me@here.com","the
</cfloop>
</cfgrid>
<cfinput type="submit" name="viewBtn" value="View Selected Message" width="270" height="40" enabled="false">
<cfinput type="text" name="selectedSubject" label="Selected Subject:" bind="{Inbox.selectedItem.
<cfinput type="text" name="selectedID" label="Selected ID:" bind="{Inbox.selectedItem.
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
Business Accounts
Answer for Membership
by: javasharpPosted on 2006-01-18 at 20:46:20ID: 15736230
Check out this link: Detailed/4 0936.html
http://www.hotscripts.com/