Hi all,
can someone please point me in the right direction before I end up with no hair!!!
I have:
1 spry region on the left of my page
1 detail region on the right of my page
1 form to add further items to the detail region.
When I click on a row in the spry region, the detail region is displayed.
When I insert a new item to the detail region, I have the dataset reload, and therefore takes me back to display the first record in the detail region.
I am trying to have things so that when I've clicked on a row, that I can insert multiple items, one after the other, without having to click on the row each time to get back into that information.
What I've done so far is:
on Spry Region set an
Then I have:
What I have works, but only after clicking the row twice. The first time I click a row, it displays the row number 0 in the alert, then if I click on a different row, it displays the row number relating to the first row I clicked.
Has anyone any idea how I can get the row number as soon as I click a row???
Any help would be greatly appreciated as this is doing my nutt!!!
Thanks
can someone please point me in the right direction before I end up with no hair!!!
I have:
1 spry region on the left of my page
1 detail region on the right of my page
1 form to add further items to the detail region.
When I click on a row in the spry region, the detail region is displayed.
When I insert a new item to the detail region, I have the dataset reload, and therefore takes me back to display the first record in the detail region.
I am trying to have things so that when I've clicked on a row, that I can insert multiple items, one after the other, without having to click on the row each time to get back into that information.
What I've done so far is:
on Spry Region set an
Code:
onclick="storeLastRow();"
Then I have:
Code:
var lastClickedRow=0;
function storeLastRow(){
lastClickedRow=staff.getRowNumber(staff.getCurrentRow());
alert("number is: " + lastClickedRow);
}
function PPEinsert(){
spryPopupDialog3.displayPopupDialog(false);
staff.addObserver({ onDataChanged: function(ds, type) {staff.setCurrentRowNumber(lastClickedRow); }});
alert("Current row is: " + lastClickedRow);
}
What I have works, but only after clicking the row twice. The first time I click a row, it displays the row number 0 in the alert, then if I click on a different row, it displays the row number relating to the first row I clicked.
Has anyone any idea how I can get the row number as soon as I click a row???
Any help would be greatly appreciated as this is doing my nutt!!!
Thanks