How to implement many functions based on marked records in table view
------------------------------------------------------------------------------------
1.) The function delete is changed. I look at the value action = delete
if (Request("action")="delete") then
....
2. the value of action can have other values than 'delete' , changed by the menue-link
For Example : in this case the value wil be changed to x_freischalten
<a href="#" onClick="if (confirm('User freischalten ?')) { document.forms.deleteform.action.value = 'xfreischalten';document.forms.deleteform.submit(); return false; } else {return true;}">[Mail: User freischalten]</a>
3. In ...list.asp I inserted the following code
if (left(Request("action"),2)="x") or (left(Request("action"),2)="X_") then
Eval (Request("action"))
end if
4. The function_name is exact the name of action and is defined in <..>_inc.asp
Function x_freischalten()
...
end Function
5. To show the different menu_actions above the table contents I defined a function in <..>_inc.asp with the name
function show_menu()
%>
<a href="#" onClick="if (confirm('User freischalten ?')) { document.forms.deleteform.action.value = 'x_freischalten';document.forms.deleteform.submit(); return false; } else {return true;}">[Mail: User freischalten]</a>
<a href="#" onClick="if (confirm('User um Rückruf bitten ?')) { document.forms.deleteform.action.value = 'x_rueckruf';document.forms.deleteform.submit(); return false; } else {return true;}">[Mail: Rückruf]</a>
<a href="#" onClick="if (confirm('Sichterweiterungsmail versenden ?')) { document.forms.deleteform.action.value = 'x_sichterweiterung';document.forms.deleteform.submit(); return false; } else {return true;}">[Mail: Sichterweiterung]</a>
<% end Function %>
6. The function show_menu() is called in ...list.asp before table header.
I hope this will give you an idea of how to increase properties of ASPRunner.
I think the individual menus should have a 1:n relation to the table(View).
Because not all users will be allowed to call a special menu it would be good to have a small
before() funktion, to decide whether the menu-text will be shown or not.
Best regards
Uwe Pfeiffer