Answered
Need help with alert
Hi, this may be a very simple, but I am kinda stuck. I have a
grid that gets populated with data. I have an edit button. What I
have now is when I select an item from the grid and click the edit
button it will take me to another form to edit the data selected.
What I wanna do now is, IF I did not select anything from the
datagrid, I want an alert message or popup message stating "I need
to select an item from the grid or nothing is selected.". What do I
need to do to accomplish this. Any help will be very much
appreciated.
Ex.
*************MY GRID **************************
<cfgrid name="searchGrid" query="Calls" >
<cfgridcolumn name="Id" header="Call Id" />
<cfgridcolumn name="Name" header="Name" />
and so on.....
</cfgrid>
******MY EDIT BUTTON ***********
<cfinput type = "button" onClick="getUrl('EditCall.cfm?CallId='+searchGrid.dataProvider[searchGrid.selectedIndex]['CallId'])" name="edit" value="Edit" />
Ex.
*************MY GRID **************************
<cfgrid name="searchGrid" query="Calls" >
<cfgridcolumn name="Id" header="Call Id" />
<cfgridcolumn name="Name" header="Name" />
and so on.....
</cfgrid>
******MY EDIT BUTTON ***********
<cfinput type = "button" onClick="getUrl('EditCall.cfm?CallId='+searchGrid.dataProvider[searchGrid.selectedIndex]['CallId'])" name="edit" value="Edit" />