I'm trying to get really fancy with action buttons and I'm in way over my head. I'm trying to combine action buttons with a script supplied by wmz in another message. (Thanks for all your help on the board Wolfgang!)
Here's what I'm trying to do
I have a grid with a checkbox column and an action button to filter on the checked rows. I did that first, and it worked.
Next, I want to add an input field and a button to set the value in the "Status" field in all the selected rows to the value from the input field. (Actually, I'd like that input to be a dropdown, but one step at a time)
So the layout in the toolbar is
[Button: Filter Selected] [Input field] [Button: Change Status]
The JavaScript written by the action buttons genie for the Filter button is
The code for the Change button, loosely adapted from wmz, is
and the code for the input field in the Toolbar template customize property is
Firebug reports three errors: The first is
"missing ; before statement
onClick: function() { var rowcountLISTINGS_STATUS_GridObj._rowsInGrid;"
I've tried putting in semicolons in various places, but haven't found the right place yet. Any suggestions? Perhaps if I fix this one, it will solve all three.
The other two errors are
LISTINGS_STATUS_GridObj is not defined
(LISTINGS_STATUS is the name of the grid)
and
LISTINGS_STATUS_BUTTONS_CHANGESELECTEDSTATUS is not defined
(CHANGESELECTEDSTATUS is the name of the second button)
I'd appreciate any help.
Thanks,
Pat
Here's what I'm trying to do
I have a grid with a checkbox column and an action button to filter on the checked rows. I did that first, and it worked.
Next, I want to add an input field and a button to set the value in the "Status" field in all the selected rows to the value from the input field. (Actually, I'd like that input to be a dropdown, but one step at a time)
So the layout in the toolbar is
[Button: Filter Selected] [Input field] [Button: Change Status]
The JavaScript written by the action buttons genie for the Filter button is
Code:
{grid.Object}.filterCheckedRows();
Code:
var rowcount{grid.Object}._rowsInGrid; for(rowis = 1; rowis <= rowcount; rowis++) { {grid.Object}.setValue('G','STATUS',rowis,$('Grid.ComponentName.STAT_INPUT').value); };
Code:
{ActionButton:FILTERSELECTED} <input type="text" id="{Grid.ComponentName}.STAT_INPUT" value="" maxlength="10" class="dborInput" /> {ActionButton:CHANGESELECTEDSTATUS}
"missing ; before statement
onClick: function() { var rowcountLISTINGS_STATUS_GridObj._rowsInGrid;"
I've tried putting in semicolons in various places, but haven't found the right place yet. Any suggestions? Perhaps if I fix this one, it will solve all three.
The other two errors are
LISTINGS_STATUS_GridObj is not defined
(LISTINGS_STATUS is the name of the grid)
and
LISTINGS_STATUS_BUTTONS_CHANGESELECTEDSTATUS is not defined
(CHANGESELECTEDSTATUS is the name of the second button)
I'd appreciate any help.
Thanks,
Pat
Comment